Skip to content

Commit

Permalink
Finish demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
takfuruya committed Mar 6, 2013
1 parent e6ea7fb commit cbbbada
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/micropost.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Micropost < ActiveRecord::Base
attr_accessible :content, :user_id
belongs_to :user
validates :content, :length => { :maximum => 140 }
end
4 changes: 4 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class User < ActiveRecord::Base
attr_accessible :email, :name
has_many :microposts
end

0 comments on commit cbbbada

Please sign in to comment.