Skip to content

Instantly share code, notes, and snippets.

@lawrencecurtis
Created January 27, 2011 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lawrencecurtis/798573 to your computer and use it in GitHub Desktop.
Save lawrencecurtis/798573 to your computer and use it in GitHub Desktop.
class DesignsController < ApplicationController
def index
@designs = Design.accepted
@designs = @designs.order("#{params[:order]} DESC") if params[:order].present?
@designs = @designs.order(:description)
respond_to do |format|
format.html
format.js { render :json => @designs }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment