Steve Russo wrote:
[...]
>>> How can I get observe_field to pass the object itself?
>> 
>> Why do you want to?  Your controller shouldn't normally be dealing with 
>> FormBuilder objects.  What are you trying to achieve?
>> 
>> Best,
>> --
>> Marnen Laibow-Koser
>> http://www.marnen.org
>> [email protected]
> 
> 
> Hi Marner

Please note correct spelling of my name.

>    I have an RJS file that is inserting a partial that has form 
> components in it. I use the observe_field in the view to detect select 
> box option. That value dictates the partial that gets rendered. Once the 
> observe_field fires, it runs an action in the controller. The controller 
> then sends the info to the rjs file. As I said, the partials rendered in 
> the RJS file have form elements and thus need the form builder object to 
> be passed from the View->controller->RJS->rendered partial.

No.  The controller never needs to touch or know about the form builder. 
That's defined in the view and only in the view.  The controller just 
needs to pass in the dynamic data.

> 
> Is this path possible?

No.  You can't pass a FormBuilder as an HTTP parameter -- HTTP 
paramaters are always strings.  Fortunately, you don't need to, as I 
explained above.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
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 [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.

Reply via email to