Module: Acts::As::Publishable::InstanceMethods
- Defined in:
- lib/acts_as_publishable/acts_as_publishable.rb
Instance Method Summary collapse
- #publish(should_raise = false) ⇒ Object
-
#publishable? ⇒ Boolean
All ActiveRecords using this plugin will now respond to publishable? with true.
Instance Method Details
#publish(should_raise = false) ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/acts_as_publishable/acts_as_publishable.rb', line 70 def publish(should_raise = false) if defined?(:save_as_live) save_as_live else raise "Add 'live' to list of acts_as_published for publish method" if should_raise end end |
#publishable? ⇒ Boolean
All ActiveRecords using this plugin will now respond to publishable? with true
68 |
# File 'lib/acts_as_publishable/acts_as_publishable.rb', line 68 def publishable?; true; end |