Module: Rcms::ApplicationController::InstanceMethods
- Defined in:
- lib/rcms/application_controller.rb
Instance Method Summary collapse
- #apply_meta_tags(object) ⇒ Object
- #rcms_menu(key, options) ⇒ Object
- #rcms_menu_class(key, options) ⇒ Object
- #render(*args) ⇒ Object
Instance Method Details
#apply_meta_tags(object) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rcms/application_controller.rb', line 22 def object = object.respond_to?(:meta_tags) ? object. : object if .is_a?(Hash) else if .respond_to?(:each) .each do |mt| mt.key => mt.value if mt.value.present? end end end end |
#rcms_menu(key, options) ⇒ Object
14 15 16 |
# File 'lib/rcms/application_controller.rb', line 14 def key, @rcms_menu = "#{[:scope]}#{key}" end |
#rcms_menu_class(key, options) ⇒ Object
18 19 20 |
# File 'lib/rcms/application_controller.rb', line 18 def key, @rcms_menu == "#{[:scope]}#{key}" ? 'active' : '' end |
#render(*args) ⇒ Object
36 37 38 39 40 |
# File 'lib/rcms/application_controller.rb', line 36 def render *args run_callbacks :render do super end end |