Skip to content

Commit

Permalink
annotate for models
Browse files Browse the repository at this point in the history
  • Loading branch information
hlee committed Jun 12, 2013
1 parent 6a4269f commit c0b748f
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/models/book.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# == Schema Information
#
# Table name: books
#
# id :integer not null, primary key
# title :string(255)
# author :string(255)
# created_at :datetime not null
# updated_at :datetime not null
# user_id :integer
# votes_count :integer default(0), not null
# asin :string(255)
#

class Book < ActiveRecord::Base
attr_accessible :author, :title, :asin

Expand Down
11 changes: 11 additions & 0 deletions app/models/config_parameter.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# == Schema Information
#
# Table name: config_parameters
#
# id :integer not null, primary key
# name :string(255)
# value :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#

class ConfigParameter < ActiveRecord::Base
attr_accessible :name, :value
end
29 changes: 29 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# first_name :string(255)
# last_name :string(255)
# created_at :datetime not null
# updated_at :datetime not null
# email :string(255) default(""), not null
# encrypted_password :string(255) default(""), not null
# reset_password_token :string(255)
# reset_password_sent_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default(0)
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# admin :boolean default(FALSE)
# failed_attempts :integer default(0)
# unlock_token :string(255)
# locked_at :datetime
# confirmation_token :string(255)
# confirmed_at :datetime
# confirmation_sent_at :datetime
# blocked :boolean default(FALSE)
#

class User < ActiveRecord::Base
# before_create :set_user_blocked
after_create :email_admin_and_user
Expand Down
11 changes: 11 additions & 0 deletions app/models/vote.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# == Schema Information
#
# Table name: votes
#
# id :integer not null, primary key
# book_id :integer
# user_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#

class Vote < ActiveRecord::Base
attr_accessible :book_id, :user_id

Expand Down

0 comments on commit c0b748f

Please sign in to comment.