Simplification of the 'link_back' code

This commit is contained in:
chris2tof committed 2011-04-19 15:05:48 +08:00
1 parent d88cae437d
commit 1909edbe2a
13 files changed
+23 -44

No files matched your search

@@ -13,14 +13,12 @@ class Admin::PagesController < ApplicationController
@page = Page.new
@page.is_published = true
@page.parent_id = @parent_item.id rescue nil
session[:last_page] = get_go_back || admin_items_url
end
def edit
@page = Page.find(params[:id])
@page.content = parse_content(@page.content, {:locale => 'show'})
@i18n_variable = @page.i18n_variable
session[:last_page] = get_go_back || admin_items_url
end
def create