Class: SuppliersController
- Inherits:
-
Spree::BaseController
- Object
- Spree::BaseController
- SuppliersController
- Defined in:
- app/controllers/suppliers_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 |
# File 'app/controllers/suppliers_controller.rb', line 5 def index @search = Supplier.search(params[:search]) @suppliers = @search.all respond_with(@suppliers) end |
#show ⇒ Object
11 12 13 14 |
# File 'app/controllers/suppliers_controller.rb', line 11 def show @supplier = Supplier.find(params[:id]) @products = Product.find(:all, :conditions => { :supplier_id => @supplier.id , :deleted_at => nil }) end |