OSDN Git Service

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