Sha256: 8f10461c58a6d5b946cf18eb99902a602a12aa9710f7822b94fe74f9948a08f2

Contents?: true

Size: 243 Bytes

Versions: 2

Compression:

Stored size: 243 Bytes

Contents

class Micropost < ActiveRecord::Base
  belongs_to :user
  
  attr_accessible :content

  validates :content, presence: true, length: { maximum: 140 }
  validates :user_id, presence: true

  default_scope order: 'microposts.created_at DESC'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
guara-0.0.3 app/models/micropost.rb
guara-0.0.1.rc app/models/micropost.rb