Fortitude v0.9.6 Release Notes
Release Date: 2016-10-21 // over 9 years ago-
- π Generator support: generation of controllers, mailers, and scaffolding will now produce nice Fortitude views
instead of ERb views. (You can add
-e erbto yourrails generatecommand 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_forcall or similar by usingsendinstead 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/_pathhelpers 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
staticwhen it hasn't been defined yet — this can often be the result of putting thestaticdeclaration above the method definition in the source file, rather than below it. (Thanks totobymaofor 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 returnedtrueinside a Fortitude widget's#contentmethod, 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 :textinternally. - Removed usage of
alias_method_chainon Ruby 2.0 and later, in favor ofModule#prepend. This removes deprecation warnings otherwise triggered by Rails 5. (UsingModule#prependcauses problems in JRuby, soalias_method_chainis still used on JRuby instead.) - Changed the behavior of
automatic_helper_access falseso 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 falsebecame 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, wherefis the object yielded to aform_forhelper, 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_pathand 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_htmlmethod 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!)