Displaying 4 results from an estimated 4 matches for "product_price".
2005 Nov 30
8
nested attributes with update_attributes()
Hi,
I am trying to use the update_attributes on object with nested
attributes and I am getting the following error:
ProductPrice expected, got HashWithIndifferentAccess
Here''s the situation (simplified):
class Product < ActiveRecord::Base
belongs_to :productPrice
end
class ProductPrice < ActiveRecord::Base
has_one :product,
:dependent => true
2005 Dec 19
1
<% unless params[:context] == :gallery -%> question
...> 12,
:conditions => "sold != ''current''")
render( :template => "store/index",
:params => { :context => :gallery})
end
template:
<% unless params[:context] == :gallery -%>
<span id="product_price"><%= @products[0].price %></span><br
/>
<span id="cart_link"> <%= link_to ''Add to Cart'',
{:action => ''add_to_cart'', :id => product },
:class => ''ad...
2006 Sep 12
3
Querying against numeric fields? e.g. price:( >= min_price)
Using acts_as_ferret I''m trying to do a query like:
active:(true) title|body:(#{params[:s]}) product_price:( >=
#{params[:min]})
Where I want to return only the active products that contain the search
term in the title or body and has a minimum price >= params[:min]
I''m finding that even though I''m indexing the product price as an
integer (so no .00 to cause confusion) I...
2006 Jul 15
4
updating multiple records with form
I have an app that has two models -- products and details. I''m building
a form that allows a user to create a new product and specify a
description, etc.
The form needs to allow for creation of multiple items in the details
model/table. for example, I have a block of form items that collect
info for the men''s version of the product -- inventory count for each
size, etc. And