The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
What's New in Edge Rails: Specify Plugin Load Ordering

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
rwdaigle

Posts: 312
Nickname: rwdaigle
Registered: Feb, 2003

Ryan is a passionate ruby developer with a strong Java background.
What's New in Edge Rails: Specify Plugin Load Ordering Posted: Sep 24, 2007 6:17 AM
Reply to this message Reply

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.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by rwdaigle
Latest Posts From Ryan's Scraps

Advertisement

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:

1
2
# 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:


config.plugins = [ :exception_notification, :ssl_requirement, :all ] 

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:


config.plugins = [ :exception_notification, :all, :ssl_requirement ] 

tags: ruby, rubyonrails

Read: What's New in Edge Rails: Specify Plugin Load Ordering

Topic: Don't get too RESTful Previous Topic   Next Topic Topic: Learning Lisp

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use