Marnen Laibow-Koser wrote:
> Steve Russo wrote:
>> Ahh!  That makes sense.  Now... :)  Fred you're my new hero!
>> 
>> So the problem seems to be I'm not correctly passing the form_builder 
>> from my view file to the controller.
>> 
>> view file
>> =============
>> 
>> <%= observe_field("trial_org_id", :url => {:action => :observe, 
>> :trial_id => @trial.id, :f=> f}, :with => 'q') %>
>> 
>> controller file
>> ==============
>> 
>> @form = params[:f]
>> 
>> 
>> I was expecting params[:f] to return the object, but as you pointed out 
>> it is returning a string describing the object.
>> 
>> 
>> 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
   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.

Is this path possible?

-- 
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