Skip to content

0.5.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@joeldrapper joeldrapper released this 30 Jan 12:39
· 270 commits to main since this release

Highlights

  • You’ll now get a fancy warning if you accidentally override append or safe_append on a view. These methods are really important since Phlex views themselves are used as ActionView’s output buffer while rendering from ERB.
  • We added the helper javascript_import_module_tag, and you can also use rich_text_area in form_with.
  • When rendering in an ActionView context, we unbuffer the yielded view. This makes it more consistent with other builder objects, as you need use <%= ERB output tags to output the result of a builder method.
  • We no longer generate an ApplicationView module on install.

The changes to ActionView rendering mean you can now render something from an outer view’s public interface inside an inner view. Here's an example:

<%= render OuterView.new do |o| %>
  <%= render InnerView.new do |i| %>
    <%= o.foo # <- this works now %>
  <% end %>
<% end %>

Previously, this would have output in the wrong order.

What's Changed

New Contributors

Full Changelog: 0.4.2...0.5.0