Ruby on Rails Friday, January 29, 2016

On 29 January 2016 at 17:42, Walter Lee Davis <waltd@wdstudio.com> wrote:
>
>> 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].

Further to this a good plan is to copy/paste the complete generated
html into the html validator
https://validator.w3.org/#validate_by_input

Often when different browsers behave differently for the a site is it
down to invalid html, which the two browsers are interpreting
differently.

Colin

--
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/CAL%3D0gLupUdbAqdi1kCM-MoxzmcOcHnU0SnFtADXAsdARFXYK8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment