Class: Cms::PageRoutesController
Instance Method Summary
collapse
Methods included from PageHelper
#able_to?, #cms_content_editor, #cms_toolbar, #container, #container_has_block?, #current_page, #page_title, #render_breadcrumbs, #render_portlet
Methods included from PathHelper
#attachment_path_for, #cms_connectable_path, #cms_index_path_for, #cms_index_url_for, #cms_new_path_for, #cms_new_url_for, #cms_sortable_column_path, #edit_cms_connectable_path, #engine_for, #link_to_usages, #path_elements_for
#handle_access_denied, #handle_server_error, #with_format
Instance Method Details
#create ⇒ Object
15
16
17
18
19
20
21
22
23
|
# File 'app/controllers/cms/page_routes_controller.rb', line 15
def create
@page_route = PageRoute.new(params[:page_route])
if @page_route.save
flash[:notice] = "Page Route Created"
redirect_to page_route_url(@page_route)
else
render :action => "new"
end
end
|
#destroy ⇒ Object
35
36
37
38
39
|
# File 'app/controllers/cms/page_routes_controller.rb', line 35
def destroy
@page_route.destroy
flash[:notice] = "Page Route Deleted"
redirect_to page_routes_url
end
|
#index ⇒ Object
7
8
9
|
# File 'app/controllers/cms/page_routes_controller.rb', line 7
def index
@page_routes = PageRoute.paginate(:order => "name", :page => params[:page])
end
|
#new ⇒ Object
11
12
13
|
# File 'app/controllers/cms/page_routes_controller.rb', line 11
def new
@page_route = PageRoute.new
end
|
#update ⇒ Object
25
26
27
28
29
30
31
32
33
|
# File 'app/controllers/cms/page_routes_controller.rb', line 25
def update
if @page_route.update_attributes(params[:page_route])
flash[:notice] = "Page Route Updated"
redirect_to page_route_url(@page_route)
else
render :action => "new"
end
end
|