class ArtistsController < ApplicationController
if Manifest.manifest.magic_numbers['run_mode'] == 0
- before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
- before_filter :authenticate_artist, :only => [:edit, :update, :destroy]
+ before_action :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
+ before_action :authenticate_artist, :only => [:edit, :update, :destroy]
else
- before_filter :authenticate_resource_reader, :only => [
+ before_action :authenticate_resource_reader, :only => [
:index, :show
]
- before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
- before_filter :authenticate_artist, :only => [:edit, :update, :destroy]
+ before_action :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
+ before_action :authenticate_artist, :only => [:edit, :update, :destroy]
end
def index
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