search for: salescontroller

Displaying 3 results from an estimated 3 matches for "salescontroller".

2006 Nov 13
5
Routes problem
I want to connect default route to controller Report::SalesController, so I have line: map.connect '''', :controller => ''report/sales'' in config/routes.rb SalesController is in app/controllers/report/sales.rb and is declared as: class Report::SalesController < ApplicationController ... end The problem is that when I try to op...
2011 Sep 09
0
respond_with and ajax
Suppose I have this controller: class SalesController < ApplicationController respond_to ????? def get_price @price = Product.find(params[:product_id]).price respond_with ????? end end 1) What do I specify for respond_to() so that get_price() will accept ajax requests? 2) What do I specify for respond_with() if all I want to do is...
2011 Sep 07
4
jquery and ajax query in rails 3
hi people I don''t know much about ajax - jquery. And right now I need to use some functionality with them. In a form (sales model) I have the following code: <div> <%= f.label :product_id, "Product" %> <%= f.collection_select( :product_id, Product.all, :id, :name, options={} ) %> </div> <div> <%= f.label :price,