Hi!

def product_attributes
 [product, quantity, description, color, size]
end

This returns 1 argument (an array). Your method expects 5 (product,
quantity, description, color and size). Maybe you want to try this with a
hash...

def product_attributes
  {:product => product, :quantity => quantity} # and so on for all
attributes
end

Then you're able to do something like:

def add_item(product_attributes)
  product = product_attributes[:product]
  quantity = product_attributes[:quantity]
  # ...
end

I hope this helps!

Nicolai

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to