Sha256: 6428ad6f71fddd76a5fe14cc4843148e4c621a039b5a2f9e91ae526422a3a904

Contents?: true

Size: 169 Bytes

Versions: 12

Compression:

Stored size: 169 Bytes

Contents

class Post < ActiveRecord::Base
  scope :published, lambda {where('published_at <= ?', Time.now)}
  scope :unpublished, lambda {where('published_at > ?', Time.now)}
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ajax_pagination-0.6.5 spec/rails_app/app/models/post.rb
ajax_pagination-0.6.4 spec/rails_app/app/models/post.rb
ajax_pagination-0.6.3 spec/rails_app/app/models/post.rb
ajax_pagination-0.6.2 spec/rails_app/app/models/post.rb
ajax_pagination-0.6.1 spec/rails_app/app/models/post.rb
ajax_pagination-0.6.0 spec/rails_app/app/models/post.rb
ajax_pagination-0.5.1 spec/rails_app/app/models/post.rb
ajax_pagination-0.5.0 spec/rails_app/app/models/post.rb
ajax_pagination-0.4.0 spec/rails_app/app/models/post.rb
ajax_pagination-0.3.0 spec/rails_app/app/models/post.rb
ajax_pagination-0.2.0 spec/rails_app/app/models/post.rb
ajax_pagination-0.1.0 spec/rails_app/app/models/post.rb