Ruby on Rails Saturday, November 30, 2019



On Saturday, November 30, 2019 at 8:07:43 PM UTC-5, Ariel Juodziukynas wrote:
It's normal that rails adds a hidden field with the name `utf8` and a check as the value, when you submit a form using GET the hidden field goes there with the other fields, there's nothing wrong there.

You should have some error on the console if something is not working, that `utf8` parameter is ok.

El sáb., 30 nov. 2019 a las 20:28, fugee ohu (<fuge...@gmail.com>) escribió:
This request has some utf8 in between "item_type_id" and "="
GET /items/new?utf8=%E2%9C%93&item%5Bitem_type_id%5D=9&commit=New+item HTTP/1.1

--
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 rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4e4ee2a6-e656-4dd2-84f0-670f9eaa40b0%40googlegroups.com.

That's the last thing in the console Here's my form:

<%= form_with(model: @item, url: new_item_path(@item), method: "get") do |f| %>

     <div class="field">
         <%= f.select :item_type_id, nested_set_options(ItemType.all, @item_type) {|i| "#{'-' * i.level} #{i.name}" }, {:include_blank => "Select"}%>
     </div>

    <div class="actions">
        <%= f.submit "New item" %>
    </div>

<% end %>

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5fd17013-9f43-41c9-8580-0f5009fd3f33%40googlegroups.com.

No comments:

Post a Comment