X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fcontrollers%2Fauthors_controller.rb;h=2b01c915f1c161f659c21a4769a6c46769da97c8;hb=674d4fb2e72c2e1653b13d026af884559fd9eb4e;hp=f45feb6bdb8385f9a87e1c22412a5b82902cc2dc;hpb=353efb207a7c0caf82ffbbd00a6425f30ebc939d;p=pettanr%2Fpettanr.git diff --git a/app/controllers/authors_controller.rb b/app/controllers/authors_controller.rb index f45feb6b..2b01c915 100644 --- a/app/controllers/authors_controller.rb +++ b/app/controllers/authors_controller.rb @@ -3,15 +3,11 @@ class AuthorsController < ApplicationController before_filter :authenticate_user, :only => [:new, :create, :edit, :update] before_filter :authenticate_author, :only => [:edit, :update] else - before_filter :authenticate_reader, :only => [:index, :show, :count] + before_filter :authenticate_reader, :only => [:index, :show] before_filter :authenticate_user, :only => [:new, :create, :edit, :update] before_filter :authenticate_author, :only => [:edit, :update] end - def self.model - Author - end - def index filer_list end @@ -30,10 +26,6 @@ class AuthorsController < ApplicationController end end - def count - list_count - end - def new form_new end @@ -57,4 +49,11 @@ class AuthorsController < ApplicationController @item.overwrite @operators render_update '/home/configure' end + + def destroy + set_model + @item = @my_model_class.edit(params[:id], @operators) + render_destroy '/home/configure' + end + end