Module: HighVoltage::StaticPage

Extended by:
ActiveSupport::Concern
Included in:
PagesController
Defined in:
app/controllers/concerns/high_voltage/static_page.rb

Instance Method Summary collapse

Instance Method Details

#invalid_pageObject

Raises:

  • (ActionController::RoutingError)


25
26
27
# File 'app/controllers/concerns/high_voltage/static_page.rb', line 25

def invalid_page
  raise ActionController::RoutingError, "No such page: #{params[:id]}"
end

#showObject



18
19
20
21
22
23
# File 'app/controllers/concerns/high_voltage/static_page.rb', line 18

def show
  render(
    template: current_page,
    locals: { current_page: current_page },
  )
end