Class: Paper
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Paper
- Includes:
- AASM
- Defined in:
- app/models/paper.rb
Instance Attribute Summary collapse
-
#paper_url ⇒ Object
Returns the value of attribute paper_url.
Instance Method Summary collapse
Instance Attribute Details
#paper_url ⇒ Object
Returns the value of attribute paper_url.
4 5 6 |
# File 'app/models/paper.rb', line 4 def paper_url @paper_url end |
Instance Method Details
#aasm_current_state_with_event_firing=(state) ⇒ Object
37 38 39 40 41 42 |
# File 'app/models/paper.rb', line 37 def aasm_current_state_with_event_firing=(state) aasm_events_for_current_state.each do |event_name| event = self.class.aasm_events[event_name] aasm_fire_event(event_name,false) if event && event.all_transitions.any?{ |t| t.to == state || t.to == state.to_sym } end end |
#paper_urls ⇒ Object
54 55 56 |
# File 'app/models/paper.rb', line 54 def paper_urls self.translations.collect(&:url) end |