Sha256: 6deb1efca8baad922438bd41973becd97d7f8709d5f661d42cf19c23983611c1

Contents?: true

Size: 297 Bytes

Versions: 13

Compression:

Stored size: 297 Bytes

Contents

class Post < NinjaModel::Base
  attribute :id, :integer, :primary_key => true
  attribute :user_id, :integer
  attribute :title, :string
  attribute :published, :boolean

  scope :published, where(:published => true)

  belongs_to :user
  has_one :body
  has_many :tags
  has_many :categories
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ninja-model-1.0.5 spec/models/post.rb
ninja-model-1.0.4 spec/models/post.rb
ninja-model-1.0.3 spec/models/post.rb
ninja-model-1.0.2 spec/models/post.rb
ninja-model-1.0.1 spec/models/post.rb
ninja-model-1.0.0 spec/models/post.rb
ninja-model-0.9.6 spec/models/post.rb
ninja-model-0.9.5 spec/models/post.rb
ninja-model-0.9.4 spec/models/post.rb
ninja-model-0.9.3 spec/models/post.rb
ninja-model-0.9.2 spec/models/post.rb
ninja-model-0.9.1 spec/models/post.rb
ninja-model-0.9.0 spec/models/post.rb