search for: size_id

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

Did you mean: site_id
2006 Jul 15
0
Validate using boolean values
...dard unit_price for that meassure. There will be many other unit_prices for a given meassure, those must be marked ''false'' table sizes meassure, :string (ie.small, medium, big) Model Size has_many :prices table prices price_name :string unit_price :integer standard :boolean size_id :integer Model Price belongs_to :size I have tried both of this validation options in the Price model, first one, then the other and none works for my stated needs. validates_uniqueness_of :standard, :scope => :size_id, :message => " : There is a standard p...
2005 Oct 05
3
Shopping Cart: SKU and Product Confusion
...So, the related DB tables were essentially this: Table Products: =========== id | sku | title | price | etc... Table Colors: ========= id | color Table Sizes: ========= id | sizes Table Colors_Products: ================= color_id | product_id Table Products_Sizes: ================ product_id | size_id Everything was fine and dandy until I got to the point where I wanted each combination of a product to appear as a separate line item in the shopping cart (the natural way to display items). There was no way for me to determine the uniqueness of a product, since they all shared the same SKU#. Ther...
2006 Dec 03
1
Ugly code
...ional) code. Note the hanging ">" that closes the "<input>". <p><label for="sizes">Sizes</label><br/> <% for size in @sizes %> <input type="checkbox" id="<%= size.id %>" name="size_ids[]" value="<%= size.id %>" <%if @product.sizes.include? size %>checked<%end%> > <%= size.name %> <% end %> Is there a method that will let me do this and have nicer looking code? I''ve had a hard time finding it if there i...