OSDN Git Service

speach balloon permission change to admin
[pettanr/pettanr.git] / app / controllers / speach_templates_controller.rb
index 401844d..d8bb57a 100644 (file)
@@ -1,5 +1,5 @@
 class SpeachTemplatesController < ApplicationController
-  before_filter :authenticate_author!, :except => [:index]
+  before_filter :authenticate_admin!, :except => [:index]
 
   # GET /speach_templates
   # GET /speach_templates.json
@@ -12,76 +12,4 @@ class SpeachTemplatesController < ApplicationController
     end
   end
 
-=begin
-  # GET /speach_templates/1
-  # GET /speach_templates/1.json
-  def show
-    @speach_template = SpeachTemplate.find(params[:id])
-
-    respond_to do |format|
-      format.html # show.html.erb
-      format.json { render json: @speach_template }
-    end
-  end
-
-  # GET /speach_templates/new
-  # GET /speach_templates/new.json
-  def new
-    @speach_template = SpeachTemplate.new
-
-    respond_to do |format|
-      format.html # new.html.erb
-      format.json { render json: @speach_template }
-    end
-  end
-
-  # GET /speach_templates/1/edit
-  def edit
-    @speach_template = SpeachTemplate.find(params[:id])
-  end
-
-  # POST /speach_templates
-  # POST /speach_templates.json
-  def create
-    @speach_template = SpeachTemplate.new(params[:speach_template])
-
-    respond_to do |format|
-      if @speach_template.save
-        format.html { redirect_to @speach_template, notice: 'Speach template was successfully created.' }
-        format.json { render json: @speach_template, status: :created, location: @speach_template }
-      else
-        format.html { render action: "new" }
-        format.json { render json: @speach_template.errors, status: :unprocessable_entity }
-      end
-    end
-  end
-
-  # PUT /speach_templates/1
-  # PUT /speach_templates/1.json
-  def update
-    @speach_template = SpeachTemplate.find(params[:id])
-
-    respond_to do |format|
-      if @speach_template.update_attributes(params[:speach_template])
-        format.html { redirect_to @speach_template, notice: 'Speach template was successfully updated.' }
-        format.json { head :ok }
-      else
-        format.html { render action: "edit" }
-        format.json { render json: @speach_template.errors, status: :unprocessable_entity }
-      end
-    end
-  end
-
-  # DELETE /speach_templates/1
-  # DELETE /speach_templates/1.json
-  def destroy
-    @speach_template = SpeachTemplate.find(params[:id])
-    @speach_template.destroy
-
-    respond_to do |format|
-      format.html { redirect_to speach_templates_url }
-      format.json { head :ok }
-    end
-  end
-=end
 end