0.5.0
Pre-release
Pre-release
Highlights
- You’ll now get a fancy warning if you accidentally override
append
orsafe_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 userich_text_area
inform_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
- Warn when overriding
append
andsafe_append
methods by @joeldrapper in #27 - Use Ruby 2.7+ argument forwarding for rails helpers by @willcosgrove in #30
- Add
javascript_import_module_tag
helper by @willcosgrove in #31 - Yield with self buffer by @joeldrapper in #36
- Add rich_text_area alias to rails helpers by @michaelloistl in #37
- Unbuffer ERB renders by @joeldrapper in #38
- Switch to RSpec by @joeldrapper in #39
- Use
unbuffered
reference on the view by @joeldrapper in #40 - Don't create an
ApplicationView
on install by @joeldrapper in #41
New Contributors
- @willcosgrove made their first contribution in #30
- @michaelloistl made their first contribution in #37
Full Changelog: 0.4.2...0.5.0