OSDN Git Service

t#30200:update i18n devise
[pettanr/pettanr.git] / app / controllers / ground_pictures_controller.rb
1 class GroundPicturesController < ApplicationController
2   layout 'test' if MagicNumber['test_layout']
3   before_filter :authenticate_user!, :only => [:index]
4   before_filter :authenticate_author, :only => [:index]
5
6   # GET /ground_pictures
7   # GET /ground_pictures.json
8   def index
9     @page = GroundPicture.page params[:page]
10     @page_size = GroundPicture.page_size params[:page_size]
11     @ground_pictures = GroundPicture.list(@page, @page_size)
12
13     respond_to do |format|
14       format.html # index.html.erb
15       format.json { render :json => @ground_pictures.to_json(GroundPicture.list_json_opt) }
16     end
17   end
18
19 end