X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=blobdiff_plain;f=app%2Fcontrollers%2Fauthors_controller.rb;h=320d74e767f2252c13d567740282e9867722aa40;hp=2b01c915f1c161f659c21a4769a6c46769da97c8;hb=d7c8065be895b67dc453b0e11ad0f259f1ca6706;hpb=289993687b12d7f0b482c7ee04e75b48c19116fa diff --git a/app/controllers/authors_controller.rb b/app/controllers/authors_controller.rb index 2b01c915..320d74e7 100644 --- a/app/controllers/authors_controller.rb +++ b/app/controllers/authors_controller.rb @@ -1,11 +1,11 @@ class AuthorsController < ApplicationController if Manifest.manifest.magic_numbers['run_mode'] == 0 - before_filter :authenticate_user, :only => [:new, :create, :edit, :update] - before_filter :authenticate_author, :only => [:edit, :update] + before_action :authenticate_user, :only => [:new, :create, :edit, :update] + before_action :authenticate_author, :only => [:edit, :update] else - before_filter :authenticate_reader, :only => [:index, :show] - before_filter :authenticate_user, :only => [:new, :create, :edit, :update] - before_filter :authenticate_author, :only => [:edit, :update] + before_action :authenticate_reader, :only => [:index, :show] + before_action :authenticate_user, :only => [:new, :create, :edit, :update] + before_action :authenticate_author, :only => [:edit, :update] end def index @@ -38,14 +38,14 @@ class AuthorsController < ApplicationController set_model @item = @my_model_class.new @item.supply_default - @item.attributes = params[@my_model_class.item_name] + @item.attributes = @item.permit_params params @item.overwrite @operators render_create root_path end def update set_edit - @item.attributes = params[@my_model_class.item_name] + @item.attributes = @item.permit_params params @item.overwrite @operators render_update '/home/configure' end