Becca Girl | 16 May 00:15

help needed with where and how best to set a param


Once again, I'm writing about a pop-up window issue and need some help.
Trying to insert a new record prior to the pop-up and other sorts of
things has proven to be a much bigger problem so instead I'll have a
default record that will serve as a placeholder for new pop-up window
values.

In my main form, if I'm editing an order, the order id is sent to the
pop-up window.  Then my pop-up window uses that information.  If it's a
new order, the pop-up window doesn't have an order id.

To work around this, I'd like to set a default order ID that I'll use
for new orders so that the pop-up window options work.

My link to the pop-up looks like this:

<%= link_to 'small window',{ :controller => 'codes', :action =>
'pop_up',
:id => @order},  :popup => ['codes',
'width=450,height=600,menubar=no,resizable=yes,scrollbars=yes'] %>

How can I override :id => @order so that I send in a default ID of 1?

If anyone has other, better design ideas, I'd love to hear them.  I
think I've exhausted all of the ones that I have seen.
--

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Gmane