Ruby on Rails Friday, January 29, 2016

> On Jan 28, 2016, at 9:52 AM, Mendel Schneerson <lists@ruby-forum.com> wrote:
>
> Sorry I put the wrong line of HTML, the form works:
>
> Here it is in Chrome
>
> <form accept-charset="UTF-8" action="/customer/5" method="post">

Is this looking at the raw HTML, or the rendered DOM? Chrome *might* be being pedantic here, and refusing to show GET attributes in a POST form. I recall somewhere in the mists of time that while that may work, it may also not be *standard* and thus a conforming UA would be within its rights to drop it, since POST trumps GET in all cases. See if the form works uniformly when you add a hidden field to it with :account_settings as the name, and remove the querystring from the form action. If you add that with a f.hidden_field helper, then you will need to change your controller to access the attribute from within the parent object's params hash, i.e.: params[:customer][:account_settings] rather than params[:account_settings].

Walter

>
>
> What is interesting is that in Firefox the tag shows up and works fine:
>
> <form accept-charset="UTF-8" action="/customer/5?account_settings=true"
> method="post" novalidate="novalidate">
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bbecfb64afafc7414dbd6a51584ef941%40ruby-forum.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/FAD87CAB-CC97-4D1F-83A3-4EA5E2C75204%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment