Posts [ 1 ]

Topic: Question about plugin load order and config.plugins

I have been successfully using the acts_as_taggable_on_steroids for a while. I am now trying to use it in conjunction with the permalink_fu plugin.

Following the documentation, I added has_permalink :name to my tag.rb file.

The problem is that it appears by default Rails loads plugins in alphabetical order so acts_as_taggable... returns an error because it does not know what to do with the has_permalink call.

The only way I was able to get this to work was to add extend PermalinkFu to the top of my Tag class definition. I also had to put a copy of permalink_fu.rb in the same directory as tag.rb.

There must be a better way, no?

I found something in the Rails Trac (bug #6851) that says I should be able to add an array of plugins to config.plugins in environment.rb and Rails will load the plugins in the order they are listed in the array.