Created
May 5, 2009 12:55
-
-
Save dummied/106955 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A paginated list of recently-added photos | |
def index | |
@photos = Photo.paginate( | |
:per_page => 36, | |
:page => page, | |
:order => "photos.created_at DESC" | |
) | |
respond_to do |format| | |
format.html { | |
render :action => "list" | |
} | |
format.js { | |
render :json => @photos.to_json | |
} | |
format.xml { | |
render :xml => @photos.to_xml | |
} | |
format.atom { | |
render :action => "list" | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment