Class: Partystreusel::StyleguideController

Inherits:
ApplicationController show all
Defined in:
app/controllers/partystreusel/styleguide_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/partystreusel/styleguide_controller.rb', line 7

def show
  template = File.join(params[:controller].gsub('partystreusel/',''), params[:page])
  render template
rescue ActionView::MissingTemplate => e
  if e.message.include? "Missing template #{template}"
    raise ActionController::RoutingError, 'Not Found'
  else
    raise e
  end
end