Module: Extensions::HighVoltagePageActionClass::ActionView::Base

Defined in:
lib/extensions/high_voltage_page_action_class/action_view/base.rb

Instance Method Summary collapse

Instance Method Details

#page_action_classObject


3
4
5
6
7
8
9
10
11
# File 'lib/extensions/high_voltage_page_action_class/action_view/base.rb', line 3

def page_action_class
  if controller.is_a?(HighVoltage::PagesController)
    # TODO: Depends on thoughtbot/high_voltage#235
    current_page = controller.send(:current_page)
    current_page.sub(/^pages\//, '')
  else
    super
  end
end