X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=blobdiff_plain;f=app%2Fcontrollers%2Fwriting_formats_controller.rb;h=4f9e0ecaefcaa419e831ab44926a80a361455720;hp=d215aecfdc5c6d8b157d40416b7a909e9cbec575;hb=d7c8065be895b67dc453b0e11ad0f259f1ca6706;hpb=62f8aae6c10ff5bed6789d45abbd4887982560c9 diff --git a/app/controllers/writing_formats_controller.rb b/app/controllers/writing_formats_controller.rb index d215aecf..4f9e0eca 100644 --- a/app/controllers/writing_formats_controller.rb +++ b/app/controllers/writing_formats_controller.rb @@ -1,20 +1,20 @@ class WritingFormatsController < ApplicationController if Manifest.manifest.magic_numbers['run_mode'] == 0 - before_filter :authenticate_user, :only => [] + before_action :authenticate_user, :only => [] else - before_filter :authenticate_reader, :only => [ + before_action :authenticate_reader, :only => [ :index, :by_system_picture, :show ] - before_filter :authenticate_user, :only => [] + before_action :authenticate_user, :only => [] end - before_filter :authenticate_admin, :only => [:new, :create, :edit, :update, :destroy] + before_action :authenticate_admin, :only => [:new, :create, :edit, :update, :destroy] def index filer_list end def by_system_picture - filer_list + filer_list param: params[:id] end def show_html_format format @@ -44,7 +44,7 @@ class WritingFormatsController < ApplicationController @item = @my_model_class.new @item.supply_default @my_model_class.fold_extend_settings params[@my_model_class.item_name] - @item.attributes = params[@my_model_class.item_name] + @item.attributes = @item.permit_params params @item.overwrite render_create end @@ -52,7 +52,7 @@ class WritingFormatsController < ApplicationController def update set_edit @my_model_class.fold_extend_settings params[@my_model_class.item_name] - @item.attributes = params[@my_model_class.item_name] + @item.attributes = @item.permit_params params @item.overwrite render_update end @@ -60,7 +60,7 @@ class WritingFormatsController < ApplicationController def destroy set_model @item = @my_model_class.edit(params[:id], @operators) - render_destroy @my_model_class.path_name + render_destroy '/' + @my_model_class.path_name end end