OSDN Git Service

iroiro
[pettanr/pettanr.git] / app / controllers / authors_controller.rb
1 class AuthorsController < ApplicationController
2   before_filter :authenticate_author!, :only => [:index, :show]
3   before_filter :authenticate_admin!, :only => [:list, :browse]
4
5   def index
6     @authors = Author.all
7
8     respond_to do |format|
9       format.html # index.html.erb
10     end
11   end
12
13   def show
14     @author = Author.find(params[:id])
15
16     respond_to do |format|
17       format.html
18     end
19   end
20
21   def list
22     @authors = Author.all
23
24     respond_to do |format|
25       format.html { render layout: 'system' }
26     end
27   end
28
29   def browse
30     @author = Author.find(params[:id])
31
32     respond_to do |format|
33       format.html { render layout: 'system' }
34     end
35   end
36   
37 end