Ruby on Rails Thursday, March 31, 2011

Hi All,

Sorry if this has been asked before, I'm just looking for a pointer on
the 'standard' or accepted way to get around this issue, as oppose to
some 'bodges' that would seem workable.

Dead simple:

I have an index page for model 'properties' which needs a per-property
link to create a new 'lease'. A link_to is fine for jumping to the
'new' page of the 'lease' model, however I want to pass the
property_id for the lease to the controller, without it appearing in
the url (Presuming I will thus have to POST it)

I know that I could do a javascript function or create a hidden form
but was wondering if there is a more elegant way to solve this, as it
must crop up all of the time.


Thanks in advance for any helpers with this


Paul

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

No comments:

Post a Comment