Sha256: 4164833436d89b02f3281ce2bfa25a7f8b4e6ba64d738a078346d9b8ff32ed4c
Contents?: true
Size: 260 Bytes
Versions: 10
Compression:
Stored size: 260 Bytes
Contents
class Post < ActiveRecord::Base attr_accessible :title, :author, :category if Rails::VERSION::MAJOR == 3 scope :even, -> { where('id % 2 = 0') } scope :odd, -> { where('id % 2 = 1') } scope :greater_than, lambda { |gt_id| where('id > ?', gt_id) } end
Version data entries
10 entries across 10 versions & 1 rubygems