Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Finished demo app

  • Loading branch information...
commit cc0d931106b624cbaa04fcf026bf41b881442279 1 parent 24d5e25
@gitfly authored
Showing with 3 additions and 0 deletions.
  1. +2 −0  app/models/micropost.rb
  2. +1 −0  app/models/user.rb
View
2  app/models/micropost.rb
@@ -1,2 +1,4 @@
class Micropost < ActiveRecord::Base
+ belongs_to :user
+ validates :content, :length=>{:maximum=>140}
end
View
1  app/models/user.rb
@@ -1,2 +1,3 @@
class User < ActiveRecord::Base
+ has_many :microposts
end
Please sign in to comment.
Something went wrong with that request. Please try again.