Module: Recordable::ClassMethods
- Defined in:
- lib/acts_as_railable/recordable.rb
Overview
class methods
Instance Method Summary collapse
- #collection_placeholder_id(record_parent = nil) ⇒ Object
- #form_error_placeholder_id ⇒ Object
- #modal_id ⇒ Object
- #modal_placeholder_id ⇒ Object
- #navbar_placeholder_id ⇒ Object
- #pagination_placeholder_id ⇒ Object
-
#per_page ⇒ Object
override methods.
- #record_name ⇒ Object
- #script_placeholder_id ⇒ Object
- #titlebar_placeholder_id ⇒ Object
Instance Method Details
#collection_placeholder_id(record_parent = nil) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/acts_as_railable/recordable.rb', line 25 def collection_placeholder_id record_parent=nil if record_parent.nil? "#{self.record_name}_collection_placeholder_id" else "#{record_parent.record_name}_#{record_parent.id}_#{self.record_name}_collection_placeholder_id" end end |
#form_error_placeholder_id ⇒ Object
13 14 15 |
# File 'lib/acts_as_railable/recordable.rb', line 13 def form_error_placeholder_id "#{self.record_name}_error_placeholder_id" end |
#modal_id ⇒ Object
41 42 43 |
# File 'lib/acts_as_railable/recordable.rb', line 41 def modal_id "#{self.record_name}_modal_id" end |
#modal_placeholder_id ⇒ Object
45 46 47 |
# File 'lib/acts_as_railable/recordable.rb', line 45 def modal_placeholder_id "#{self.record_name}_modal_placeholder_id" end |
#navbar_placeholder_id ⇒ Object
21 22 23 |
# File 'lib/acts_as_railable/recordable.rb', line 21 def "#{self.record_name}_navbar_placeholder_id" end |
#pagination_placeholder_id ⇒ Object
33 34 35 |
# File 'lib/acts_as_railable/recordable.rb', line 33 def pagination_placeholder_id "#{self.record_name}_pagination_placeholder_id" end |
#per_page ⇒ Object
override methods
50 51 52 |
# File 'lib/acts_as_railable/recordable.rb', line 50 def per_page nil end |
#record_name ⇒ Object
9 10 11 |
# File 'lib/acts_as_railable/recordable.rb', line 9 def record_name self.model_name.singular end |
#script_placeholder_id ⇒ Object
37 38 39 |
# File 'lib/acts_as_railable/recordable.rb', line 37 def script_placeholder_id "#{self.record_name}_script_placeholder_id" end |
#titlebar_placeholder_id ⇒ Object
17 18 19 |
# File 'lib/acts_as_railable/recordable.rb', line 17 def "#{self.record_name}_titlebar_placeholder_id" end |