Class: Cms::PageRoutesController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- Cms::PageRoutesController
- Defined in:
- app/controllers/cms/page_routes_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/cms/page_routes_controller.rb', line 14 def create @page_route = PageRoute.new(page_route_params) if @page_route.save flash[:notice] = "Page Route Created" redirect_to page_routes_path else render :action => "new" end end |
#destroy ⇒ Object
34 35 36 37 38 |
# File 'app/controllers/cms/page_routes_controller.rb', line 34 def destroy @page_route.destroy flash[:notice] = "Page Route Deleted" redirect_to page_routes_url end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/cms/page_routes_controller.rb', line 6 def index @page_routes = PageRoute.paginate(:page => params[:page]).order("name") end |
#new ⇒ Object
10 11 12 |
# File 'app/controllers/cms/page_routes_controller.rb', line 10 def new @page_route = PageRoute.new end |
#update ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/cms/page_routes_controller.rb', line 24 def update if @page_route.update(page_route_params) flash[:notice] = "Page Route Updated" redirect_to page_routes_path else render :action => "new" end end |