Skip to content

Instantly share code, notes, and snippets.

@ericf
Created July 15, 2011 17:18
Show Gist options
  • Select an option

  • Save ericf/1085095 to your computer and use it in GitHub Desktop.

Select an option

Save ericf/1085095 to your computer and use it in GitHub Desktop.
handlePlace : function (req) {
var params = req.params,
page = (parseInt(params.page, 10) || 1) - 1;
// redirect crufty URL to a clearer one
if (params.page && page <= 0) {
return this.replace('/place/' + params.id + '/');
}
this.place.set('id', params.id);
this.set('photosPage', page);
this.showGridView();
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment