Forum: Ruby on Rails Very strange observe_form problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ben J. (Guest)
on 2007-02-04 22:44
I am doig something very simple here and this is not working correctly.
So any help is greatly appreciated.


I ahve this code in my template:

<% form_for :company_branch, @company_branch, :html => {:id =>
"company_branch_form"} do |f| %>
<%= f.text_field :street1 %>
<%= f.text_field :street2 %>
<% end %>
<%= observe_form("company_branch_form", :frequency => 1) %>


The params I get when the form changes is:

{"company_branch_id"=>"1", "action"=>"edit",
"controller"=>"admin/company_branches/details"}

This has NONE of the form values. Then when I change the observe_form
line of code to:

<%= observe_form("company_branch_form", :frequency => 1, :with => "wtf")
%>

I get these params:

{"company_branch_id"=>"1", "company_branch"=>{"street2"=>""},
"action"=>"edit", "controller"=>"admin/company_branches/details",
"wtf"=>"company_branch[street1]=1420 Broadwayd"}

It only sends me one of the fields in the proper format and the other
one is assigned to "wtf".

Any help is greatly appreciated, I have been working on this for hours
and can't seem to find a solution.
Jamez (Guest)
on 2007-02-06 12:24
(Received via mailing list)
Try posting your question on refwell.com. You might get your answer
there
James

On Feb 4, 9:44 pm, Ben J. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.