OSDN Git Service

speach balloon permission change to admin
[pettanr/pettanr.git] / app / controllers / balloon_templates_controller.rb
index a1ef251..22728ce 100644 (file)
@@ -1,5 +1,5 @@
 class BalloonTemplatesController < ApplicationController
-  before_filter :authenticate_author!, :except => [:index]
+  before_filter :authenticate_admin!, :except => [:index]
   
   # GET /balloon_templates
   # GET /balloon_templates.json
@@ -11,76 +11,4 @@ class BalloonTemplatesController < ApplicationController
       format.json { render json: @balloon_templates }
     end
   end
-=begin
-  # GET /balloon_templates/1
-  # GET /balloon_templates/1.json
-  def show
-    @balloon_template = BalloonTemplate.find(params[:id])
-
-    respond_to do |format|
-      format.html # show.html.erb
-      format.json { render json: @balloon_template }
-    end
-  end
-
-  # GET /balloon_templates/new
-  # GET /balloon_templates/new.json
-  def new
-    @balloon_template = BalloonTemplate.new
-
-    respond_to do |format|
-      format.html # new.html.erb
-      format.json { render json: @balloon_template }
-    end
-  end
-
-  # GET /balloon_templates/1/edit
-  def edit
-    @balloon_template = BalloonTemplate.find(params[:id])
-  end
-
-  # POST /balloon_templates
-  # POST /balloon_templates.json
-  def create
-    @balloon_template = BalloonTemplate.new(params[:balloon_template])
-
-    respond_to do |format|
-      if @balloon_template.save
-        format.html { redirect_to @balloon_template, notice: 'Balloon template was successfully created.' }
-        format.json { render json: @balloon_template, status: :created, location: @balloon_template }
-      else
-        format.html { render action: "new" }
-        format.json { render json: @balloon_template.errors, status: :unprocessable_entity }
-      end
-    end
-  end
-
-  # PUT /balloon_templates/1
-  # PUT /balloon_templates/1.json
-  def update
-    @balloon_template = BalloonTemplate.find(params[:id])
-
-    respond_to do |format|
-      if @balloon_template.update_attributes(params[:balloon_template])
-        format.html { redirect_to @balloon_template, notice: 'Balloon template was successfully updated.' }
-        format.json { head :ok }
-      else
-        format.html { render action: "edit" }
-        format.json { render json: @balloon_template.errors, status: :unprocessable_entity }
-      end
-    end
-  end
-
-  # DELETE /balloon_templates/1
-  # DELETE /balloon_templates/1.json
-  def destroy
-    @balloon_template = BalloonTemplate.find(params[:id])
-    @balloon_template.destroy
-
-    respond_to do |format|
-      format.html { redirect_to balloon_templates_url }
-      format.json { head :ok }
-    end
-  end
-=end
 end