As bharat sait do r.save! instead of r.save to view the errors
raised...
On Oct 25, 1:52 pm, Bharat <[EMAIL PROTECTED]> wrote:
> params={}
> params[:flight] = "1111"
> params[:airline] = "Air France"
> params[:luggage] = 0
> r=Reservation.new params
> r.save
>
> params is a special hash class withindifferentaccess (whatever it
> means). So make sure that you Initialize that hash class rather than
> a ruby native hash as you are doing above. Rails adds extra methods
> to hash class to make it indifferent to symbol keys or string keys I
> believe.
>
> I have run into a large number of issues like this while upgrading a
> rails 1.2.6 app to rails 2.1.0 -- too many to list here.
>
> You are also doing the r.save! which is guaranteed (relatively
> speaking) to raise an error if not successful.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---