new page_content app
This commit is contained in:
1 parent
b0834c0c62
commit
9b001aa6c3
66 files changed
+1367
No files matched your search
@@ -35,6 +35,11 @@ class Admin::PagesController < ApplicationController
|
||||
|
||||
def create
|
||||
@item = Page.new(params[:page])
|
||||
|
||||
if @item.module_app.key == 'page_content'
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
|
||||
if @item.save
|
||||
flash.now[:notice] = t('admin.create_success_page')
|
||||
respond_to do |format|
|
||||
@@ -54,6 +59,11 @@ class Admin::PagesController < ApplicationController
|
||||
|
||||
def update
|
||||
@item = Page.find(params[:id])
|
||||
|
||||
if @item.module_app.key == 'page_content' && @item.page_contexts.blank?
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
|
||||
if @item.update_attributes(params[:page])
|
||||
flash[:notice] = t('admin.update_success_page')
|
||||
respond_to do |format|
|
||||
|
||||
Reference in new issue
Block a user