Class: Spree::Admin::FavoriteProductsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/admin/favorite_products_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
# File 'app/controllers/spree/admin/favorite_products_controller.rb', line 5

def index
  @favorite_products = Spree::Product.favorite.page(params[:page])
end

#usersObject



9
10
11
12
# File 'app/controllers/spree/admin/favorite_products_controller.rb', line 9

def users
  @product = Spree::Product.where(:id => params[:id]).first
  @users = @product.favorite_users.page(params[:page])
end