OSDN Git Service

t#:
[pettanr/pettanr.git] / app / controllers / comics_controller.rb
index c3ce66a..f8f0a04 100644 (file)
@@ -8,7 +8,6 @@ class ComicsController < ApplicationController
     before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
     before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
   end
-  before_filter :authenticate_admin!, :only => [:list, :browse]
 
   def self.model
     Comic
@@ -38,36 +37,18 @@ class ComicsController < ApplicationController
     end
   end
   
-  def list
-    @comics = Comic.all
-
-    respond_to do |format|
-      format.html { render layout: 'system' }# index.html.erb
-      format.json { render json: @comics }
-    end
-  end
-
-  def browse
-    @comic = Comic.find(params[:id])
-
-    respond_to do |format|
-      format.html { render layout: 'system' } # show.html.erb
-      format.json { render json: @comic }
-    end
-  end
-  
   def new
     @comic = Comic.new
     @comic.supply_default
     respond_to do |format|
-      format.html # new.html.erb
+      format.html
       format.js
       format.json { render json: @comic.to_json(Comic.show_json_opt) }
     end
   end
 
   def edit
-    @comic = Comic.edit(params[:id], @author)
+    @comic = Comic.edit(params[:id], @operators)
     respond_to do |format|
       format.html 
       format.js
@@ -111,7 +92,7 @@ class ComicsController < ApplicationController
   end
 
   def destroy
-    @comic = Comic.edit(params[:id], @author)
+    @comic = Comic.edit(params[:id], @operators)
     respond_to do |format|
       if @comic.destroy_with_story
         flash[:notice] = I18n.t('flash.notice.destroyed', :model => Comic.model_name.human)