The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Plugins and the Inflector - A Stopgap Measure

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
Jeremy Voorhis

Posts: 212
Nickname: jvoorhis
Registered: Oct, 2005

Jeremy Voorhis is a Rubyist in northeast Ohio.
Plugins and the Inflector - A Stopgap Measure Posted: Jul 26, 2006 2:34 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jeremy Voorhis.
Original Post: Plugins and the Inflector - A Stopgap Measure
Feed Title: JVoorhis
Feed URL: http://feeds.feedburner.com/jvoorhis
Feed Description: JVoorhis is a Rubyist in northeast Ohio. He rambles about Ruby on Rails, development practices, other frameworks such as Django, and on other days he is just full of snark.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jeremy Voorhis
Latest Posts From JVoorhis

Advertisement

While reading through the source of Rails::Initializer, I discovered and confirmed a solution to ordering problem documented at http://www.jvoorhis.com/articles/2006/06/30/plugins-and-the-inflector.

The individual environment files (config/environments/development.rb, et. al.) are loaded before any plugins are loaded, while the last portion of config/environment.rb is loaded after plugins are loaded.

This means that you can declare your custom inflections in those individual environment files. Just be sure that your inflections are shared across all three files. A good solution might be to create config/inflections.rb and require it in all three sites.

Read: Plugins and the Inflector - A Stopgap Measure

Topic: DSLs Are the Long Tail of Programming Languages Previous Topic   Next Topic Topic: Memoize

Sponsored Links



Google
  Web Artima.com   

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