OSDN Git Service

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