Module: Publishus::ClassMethods
- Defined in:
- lib/publishus.rb
Instance Method Summary collapse
Instance Method Details
#publishable ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/publishus.rb', line 19 def publishable versioned named_scope :published, :conditions => "#{name.tableize}.published_at is not null and (#{name.tableize}.deleted_at < #{name.tableize}.published_at or #{name.tableize}.deleted_at is null)" do def live collect do |publishable| publishable.live end end end before_destroy :choose_fait include InstanceMethods end |