I''m in the position where I want to redirect_to a form and populate a
few of the values to make things easier on the user (say, if I know
the user is going to use the form 3 times but some of the data will
remain the same). I accomplish it like this:
def add
@inventory = Inventory.new(params[:inventory])
end
And then, somewhere else...
redirect to :action => :add, "inventory[tracking_number]" => 5
This works (although, is there a better, more rails-like way to do
this?). It doesn''t work however when I have a date_select. I would
expect this to work
redirect to :action => :add, "inventory[invoice_on]" =>
Date.parse("8/4/1954")
But the date selects do not change. Do I really need to manually
break up the date into month/day/year and pass each one as a
parameter? I''m new to all this and feel like I''m missing a
rails-like
solution.