-
Fix
collection_radio_buttonsandcollection_check_boxesgenerating a labelforattribute that does not match the inputidwhen a collection value isnil.Kenta Ishizaki
-
Pass render options and block to calls to
#render_inclass Greeting def render_in(view_context, **) if block_given? view_context.render(html: yield) else view_context.render(inline: <<~ERB.strip, **) Hello <%= local_assigns[:name] || "World" %> ERB end end end render(Greeting.new) # => "Hello, World" render(Greeting.new, name: "Local") # => "Hello, Local" render(renderable: Greeting.new, locals: { name: "Local" }) # => "Hello, Local" render(Greeting.new) { "Hello, Block" } # => "Hello, Block"Sean Doyle
-
Add
f.datalisttoFormBuilderExample:
<%= form_with model: @post do |f| %> <%# Wire the input to the datalist using the same derived id: %> <%= f.text_field :country, list: f.field_id(:country, :datalist) %> <%= f.datalist :country, ["Argentina", "Brazil", "Chile"] %> <% end %> Produces: <input list="post_country_datalist" type="text" name="post[country]" id="post_country" /> <datalist id="post_country_datalist"> <option value="Argentina">Argentina</option> <option value="Brazil">Brazil</option> <option value="Chile">Chile</option> </datalist> *Tahsin Hasan* -
Add
datalist_tagto createdatalistform elements.Example:
datalist_tag('countries_datalist', ['Argentina', ['Brazil', { class: 'brazilian_option' }], ['Chile', 'CL', { disabled: true }]], { class: 'sa-countries-sample' }) #=> <datalist id="countries_datalist" class="sa-countries-sample"> <option value="Argentina">Argentina</option> <option value="Brazil" class="brazilian_option">Brazil</option> <option value="CL" disabled="disabled">Chile</option> </datalist>Willian Gustavo Veiga
-
Render
Hashand keyword options as dasherized HTML attributestag. "POST to /clicked", hx: { post: "/clicked", swap: :outerHTML, data: { json: true } } # => <button hx-post="/clicked" hx-swap="outerHTML" hx-data="{"json":true}">POST to /clicked</button>Sean Doyle
-
ViewReloader#deactivateremoves thefile_system_resolver_hookscallback so forked processes that clear reloaders no longer trigger filesystem scans on everyprepend_view_path.Dave Ariens
-
Defer the View watcher build until view paths are actually registered.
Hugo Vacher
-
Skip blank attribute names in tag helpers to avoid generating invalid HTML.
Mike Dalessio
-
Fix tag parameter content being overwritten instead of combined with tag block content. Before
tag.div("Hello ") { "World" }would just return<div>World</div>, now it returns<div>Hello World</div>.DHH
-
Add ability to pass a block when rendering collection. The block will be executed for each rendered element in the collection.
Vincent Robert
-
Add
key:andexpires_in:options undercached:torenderwhen used withcollection:Jarrett Lusso
Please check [8-1-stable]) for previous changes.