Module: ActsAsPublished::ActiveRecord::ClassMethods
- Defined in:
- lib/acts_as_published/active_record.rb
Instance Method Summary collapse
Instance Method Details
#acts_as_published ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/acts_as_published/active_record.rb', line 11 def acts_as_published attr_accessible :published if Rails.version < '4' def published t = self.arel_table where(t[:published_at].not_eq(nil)) end def unpublished t = self.arel_table where(t[:published_at].eq(nil)) end end |
#published ⇒ Object
14 15 16 17 |
# File 'lib/acts_as_published/active_record.rb', line 14 def published t = self.arel_table where(t[:published_at].not_eq(nil)) end |
#unpublished ⇒ Object
19 20 21 22 |
# File 'lib/acts_as_published/active_record.rb', line 19 def unpublished t = self.arel_table where(t[:published_at].eq(nil)) end |