Class: Kuhsaft::PagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Kuhsaft::PagesController
- Defined in:
- app/controllers/kuhsaft/pages_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/kuhsaft/pages_controller.rb', line 5 def show @url = "#{params[:locale]}/#{params[:url]}" if params[:url].present? && params[:locale].present? @page = Kuhsaft::Page.find_by_url(@url) if @page.present? respond_with @page else if respond_to?(:handle_404) handle_404 else raise ActionController::RoutingError.new('Not Found') end end end |