Forum: Ruby on Rails Passing an object as parameter...

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Daniel Smedegaard B. (Guest)
on 2007-03-12 21:23
(Received via mailing list)
Continuing my previous question, I think I could work my way around it
if I could just figure out how to pass an object in an url, more or
less like this (this is a view):

<% my_preset_model = => 'this needs to be
set to this') %>

<%= link_to_remote  icon_for_backend_list_create,
                    :url => {
                              :controller => :my_models,
                              :action => :create,
                              :preset_to_base_new_model_on =>
my_preset_model, # <<<< RIGHT THERE
                              :update => "#{content_element_id}_body"
                    :before =>
                    :complete =>
"Element.hide('#{content_element_id}_activity_indicator')" %>

I can't do this - I was hoping to see something like,
:preset_to_base_new_model_on => { :preset_value => 'this needs to be
set to this' }

among the sent parameters, but nothing goes there.

Anyone know how I could do that?

Thanks :)

This topic is locked and can not be replied to.