OSDN Git Service

list browser created
[pettanr/pettanr.git] / app / controllers / speach_templates_controller.rb
index d8bb57a..ddc3011 100644 (file)
@@ -1,5 +1,6 @@
 class SpeachTemplatesController < ApplicationController
-  before_filter :authenticate_admin!, :except => [:index]
+  before_filter :authenticate_author!, :only => [:index, :show]
+  before_filter :authenticate_admin!, :only => [:list, :browse]
 
   # GET /speach_templates
   # GET /speach_templates.json
@@ -12,4 +13,13 @@ class SpeachTemplatesController < ApplicationController
     end
   end
 
+  def list
+    @speach_templates = SpeachTemplate.all
+
+    respond_to do |format|
+      format.html { render layout: 'system' }
+      format.json { render json: @speach_templates }
+    end
+  end
+
 end