Skip to content

Instantly share code, notes, and snippets.

@mmower
Created June 1, 2011 10:46
Show Gist options
  • Save mmower/1002104 to your computer and use it in GitHub Desktop.
Save mmower/1002104 to your computer and use it in GitHub Desktop.
@deals = Deal
if params[:updated_at] != ''
@deals = @deals.where("UNIX_TIMESTAMP(created) >= ?", params[:updated_at])
end
@deals = @deals.page(params[:page].to_i).per(params[:per_page].to_i).all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment