Sha256: 78e47ad59891473c3bee53fe139cd78822e395d33829e3e0b38490fe2f0dd8bc
Contents?: true
Size: 492 Bytes
Versions: 1
Compression:
Stored size: 492 Bytes
Contents
ActiveAdmin.register Post do scope :all, :default => true scope :drafts do |posts| posts.where(["published_at IS NULL"]) end scope :scheduled do |posts| posts.where(["posts.published_at IS NOT NULL AND posts.published_at > ?", Time.now.utc]) end scope :published do |posts| posts.where(["posts.published_at IS NOT NULL AND posts.published_at < ?", Time.now.utc]) end scope :my_posts do |posts| posts.where(:author_id => current_admin_user.id) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
activeadmin-axlsx-1.0.0a | spec/rails/rails-3.2.8/app/admin/posts.rb |