Class: Breeze::ViewController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Breeze::ViewController
- Defined in:
- app/controllers/breeze/view_controller.rb
Instance Method Summary collapse
Instance Method Details
#page ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/breeze/view_controller.rb', line 4 def page locale = params[:lang] || I18n.default_locale I18n.locale = locale @page = Page.find_by_name(params[:id]) if @page.nil? redirect_to "/" , alert: "No page #{params[:id]}" else @title = @page.["title"] if @page. @description = @page.["description"] if @page. end end |