class ScrollsController < ApplicationController
if Manifest.manifest.magic_numbers['run_mode'] == 0
- before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
- before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
+ before_action :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
+ before_action :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
else
- before_filter :authenticate_reader, :only => [
+ before_action :authenticate_reader, :only => [
:top, :index, :show, :play, :by_panel, :by_author
]
- before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
- before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
+ before_action :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
+ before_action :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
end
def index
end
def by_author
- filer_list
+ filer_list param: params[:id]
end
def by_panel
- filer_list
+ filer_list param: params[:id]
end
def show_html_format format
format.html {
if @item.own? @operators
@fresh_panel_items = assist_items('panels', 'index')
- @new_panel_items = assist_items('home', 'panels')
+ @new_panel_items = assist_items('home', 'panels', finder: :find_private, param: @operators)
end
}
- list_json_format @list, format
+ list_json_format @finder, format
end
end
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
end
def update
set_edit
- @item.attributes = params[@my_model_class.item_name]
+ @item.attributes = @item.permit_params params
@item.overwrite @operators
render_update
end