Skip to content

Instantly share code, notes, and snippets.

@iamakimmer
Created March 23, 2013 17:55
Show Gist options
  • Save iamakimmer/5228737 to your computer and use it in GitHub Desktop.
Save iamakimmer/5228737 to your computer and use it in GitHub Desktop.
def index
@products = Product.includes(:user).all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @products }
format.xml { render xml: @products }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment