OSDN Git Service

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