This post originated from an RSS feed registered with Ruby Buzz
by rwdaigle.
Original Post: What's New in Edge Rails: Specify Plugin Load Ordering
Feed Title: Ryan's Scraps
Feed URL: http://feeds.feedburner.com/RyansScraps
Feed Description: Ryan Daigle's various technically inclined rants along w/ the "What's new in Edge Rails" series.
You’ve always been able to specify exactly which plugins you want to be loaded up with your Rails app, instead of haphazardly loading everything in vendor/plugins with this little snippet that you may or may not see in your environment.rb file:
12
# Only load the plugins named here, by default all plugins in vendor/plugins are loaded config.plugins = %W( exception_notification ssl_requirement )
The problem with this is that while you can explicitly specify which plugins you want loaded and in what order, it becomes quite tedious to list out every plugin when you only care about the load order of a select few.
Well, this has been taken care of with the :all symbol you can now use in your config.plugin list to denote all other plugins not explicitly listed:
This gives you finer-grain control over your plugin load order. You can even use :all in the middle of your load order if you want to push some plugins to the back of the line: