class LicensesController < ApplicationController
- before_filter :authenticate_resource_reader, :only => [
+ before_action :authenticate_resource_reader, :only => [
:by_license_group, :by_system_picture
]
- before_filter :authenticate_admin, :only => [:new, :create, :edit, :update, :destroy]
+ before_action :authenticate_admin, :only => [:new, :create, :edit, :update, :destroy]
def index
filer_list
@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
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