OSDN Git Service

fix panel test
[pettanr/pettanr.git] / app / controllers / speeches_controller.rb
1 class SpeechesController < ApplicationController
2   before_filter :authenticate_user!, :only => [:index, :show]
3   before_filter :authenticate_admin!, :only => [:list, :browse]
4
5   # GET /speeches
6   # GET /speeches.json
7   def index
8     @speeches = Speech.all
9
10     respond_to do |format|
11       format.html # index.html.erb
12       format.json { render json: @speeches }
13     end
14   end
15
16   def list
17     @speeches = Speech.all
18
19     respond_to do |format|
20       format.html { render layout: 'system' }
21       format.json { render json: @speeches }
22     end
23   end
24 end