OSDN Git Service

rails upgrade to 4
[pettanr/pettanr.git] / app / controllers / original_picture_license_groups_controller.rb
index 9b78878..3f74b0e 100644 (file)
@@ -1,6 +1,6 @@
 class OriginalPictureLicenseGroupsController < ApplicationController
-  before_filter :authenticate_user, :only => [:new, :create]
-  before_filter :authenticate_artist, :only => [:new, :create]
+  before_action :authenticate_user, :only => [:new, :create]
+  before_action :authenticate_artist, :only => [:new, :create]
   
   def new
     @original_picture = OriginalPicture.show params[:original_picture_id], @operators
@@ -20,7 +20,7 @@ class OriginalPictureLicenseGroupsController < ApplicationController
     
     @item = @my_model_class.new
     @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 
     @original_picture = OriginalPicture.show @item.original_picture, @operators