Skip to content

Instantly share code, notes, and snippets.

@frankyston
Last active December 28, 2015 05:18
Show Gist options
  • Save frankyston/7448538 to your computer and use it in GitHub Desktop.
Save frankyston/7448538 to your computer and use it in GitHub Desktop.
Controller de Produtos
class Admin::ProductsController < ApplicationController
def index
@admin_products = Admin::Product.paginate(:page => params[:page], :per_page => 10)
respond_to do |format|
format.html # index.html.erb
format.json { render json: @admin_products }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment