Fortitude v0.9.6 Release Notes
Release Date: 2016-10-21 // over 8 years ago-
- π Generator support: generation of controllers, mailers, and scaffolding will now produce nice Fortitude views
instead of ERb views. (You can add
-e erb
to yourrails generate
command line to switch back to ERb if desired.) Thanks to Gaelan for the suggestion! - π Fixed an issue where if you tried to invoke methods on the object yielded to a
form_for
call or similar by usingsend
instead of calling it directly (e.g.,form_for(...) do |f|
, thenf.send(:text_field, ...)
instead off.text_field ...
), the method invocation would appear to be ignored. - Fixed an issue where Rails
_url
/_path
helpers didn't correctly pick up parameters set from the incoming request. (Thanks to Adam Becker for the bug report!)
- π Generator support: generation of controllers, mailers, and scaffolding will now produce nice Fortitude views
instead of ERb views. (You can add
Previous changes from v0.9.5
-
- π Rails 5 compatibility: Fortitude now is fully compatible with Rails 5.0.0.1.
- π Significant improvements in performance to our dispatching to #t, the Rails method to produce translations of localized strings. Localized Rails applications tend to use this method a lot, so its performance can have a big impact on overall application performance.
- π A much better error message if you try to declare a method
static
when it hasn't been defined yet — this can often be the result of putting thestatic
declaration above the method definition in the source file, rather than below it. (Thanks totobymao
for the bug report!) - β‘οΈ Updated versions of Ruby and Rails that Travis CI tests against to the very latest.
- π Fixed an issue where Fortitude wasn't properly respecting Rails' view paths. Fortitude templates could be found at
alternate view paths, but our trick of namespacing views under
Views::
wouldn't apply. Now, it all works perfectly. (Thanks to Karl He for the bug report and example patch!) - π Fixed an issue where
#block_given?
always returnedtrue
inside a Fortitude widget's#content
method, whether a block was supplied to it or not. (Thanks to Jeff Dickey for the bug report!) - π Fixed an incompatibility between Fortitude and Rails 4.2.5.1, since Rails 4.2.5.1 added a fifth parameter to
ActionView::PathResolver#find_templates
. (Thanks to Luke Francl for the bug report!) - π Fixed incompatibilities with more-recently released versions of gems (
uglifier
,rake
,activesupport
) that otherwise broke compatibility with previous Ruby versions. - π Fixed an issue where Fortitudeβs system for figuring out what the name of a Fortitude widget would be, based on its
filename, could be confused by filenames ending in other extensions before
.rb
(for example,.html.rb
). - π Eliminated a deprecation warning from Rails 5 caused by Fortitude's use of
render :text
internally. - Removed usage of
alias_method_chain
on Ruby 2.0 and later, in favor ofModule#prepend
. This removes deprecation warnings otherwise triggered by Rails 5. (UsingModule#prepend
causes problems in JRuby, soalias_method_chain
is still used on JRuby instead.) - Changed the behavior of
automatic_helper_access false
so that, in a Rails application, it still makes all the built-in Rails helpers properly accessible, but does not make user-defined helpers accessible. (If there are even certain built-in Rails helpers you donβt want people using, you can easily override them in your widget class to raise an exception.) Without this,automatic_helper_access false
became so cumbersome to use that it was nearly pointless. (Thanks to Matt Walters for the pull request!) - Fixed an issue where explicitly declaring an assignment method as a helper (e.g.,
helper :foo=
) did not work properly. - Fixed an issue where passing a block to (e.g.)
f.label
, wheref
is the object yielded to aform_for
helper, did not work properly. (Thanks to Adam Becker for the bug report and test case!) - β¬οΈ Reduced escaping in attribute values: only
"
and&
need to be escaped, not<
,>
, or'
. (Thanks to Adam Becker for the bug report!) - π Fixed an issue where, under certain extremely rare circumstances, adding a view path in the controller (using
ActionView::ViewPaths.append_view_path
and related methods) would not be able to figure out the proper class name of the widget, and would fail. (Thanks to Leaf for the bug report!) - β Added the ability for the
inline_html
method on a widget class to accept aFortitude::RenderingContext
, thus allowing you to use it with code requiring access to helpers. (Thanks to Adam Becker for the bug report!)