From: Julian Leviston Date: 2008-04-08T12:58:41+09:00 Subject: Re: how to create a product instance? Why do you need to pass arguments as an array? this way you mention: > product = Product.new(:name => 'aaaa aaa', :foo => 'uuuu') that *IS* a hash. Product.new({:name => 'blah'}) is the same as Product.new(:name => 'blah') Or do you mean an array of arrays? Julian. Learn Ruby on Rails! Check out the FREE VIDS (for a limited time) VIDEO #3 out NOW! http://sensei.zenunit.com/ On 08/04/2008, at 1:19 PM, dare ruby wrote: > > > product = Product.new(:name => 'aaaa aaa', :foo => 'uuuu') > > I have even tried by passing using a hash but its not working. but for > me i need to pass the arguments as an array. so could you please > suggest > some way to proceed. > > -- > Posted via http://www.ruby-forum.com/. >