Sha256: d381de655eb1c86c9f00678f0fe1b7a97b84b8249a3242129663498e3ff68674
Contents?: true
Size: 629 Bytes
Versions: 2
Compression:
Stored size: 629 Bytes
Contents
class SuppliersController < Spree::BaseController helper :products helper :dragonfly respond_to :html def index @search = Supplier.search(params[:search]) ### @suppliers = Supplier.where("name LIKE ?", "%#{params[:search]}%") @suppliers = @search.all respond_with(@suppliers) end def show @supplier = Supplier.find_by_slug(params[:id]) || Supplier.find(params[:id]) @products = Product.find(:all, :conditions => { :supplier_id => @supplier.id , :deleted_at => nil }).paginate(:page => params[:page], :per_page => 12) @json = @supplier.to_gmaps4rails @message = Message.new end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_suppliers-0.0.1 | app/controllers/suppliers_controller.rb |
spree_suppliers-0.60.3 | app/controllers/suppliers_controller.rb |