Fortitude v0.9.5 Release Notes

Release Date: 2016-10-12 // over 6 years ago
    • ๐Ÿš… 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 the static declaration above the method definition in the source file, rather than below it. (Thanks to tobymao 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 returned true 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 of Module#prepend. This removes deprecation warnings otherwise triggered by Rails 5. (Using Module#prepend causes problems in JRuby, so alias_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, where f is the object yielded to a form_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 a Fortitude::RenderingContext, thus allowing you to use it with code requiring access to helpers. (Thanks to Adam Becker for the bug report!)