[Backgroundrb-devel] Unable to load Models which reference plugins?

hemant gethemant at gmail.com
Wed Jan 23 00:03:39 EST 2008


On Jan 23, 2008 7:50 AM, Yves-Eric Martin
<yem_backgroundrb-devel at filter.yve.net> wrote:
> James Howison wrote:
> > ps. Is there any smart automated way to change a Rails Model's name,
> > it is scattered all over the place, in files and filenames, not to
> > mention the database?
> >
> Yes, it can be a real pain to rename a model. That is why the "rename
> your model" solution made me wince...

Yeah, I know it sucks to rename a model, just for using a plugin.

> As you pointed out, plugins should be very verbose with their
> namespace/paths in order to avoid conflicting with the main application.
> Now a small problem with
> require './vendor/plugins/backgroundrb/framework/event.rb'
> is that the path is hardcoded. It could be something else (I could have
> checked out the plugin code into ./vendor/plugins/BackgrounDRb). I went
> through some other plugins code to look for best practices, and it looks
> like a better way to do it would be:
> require File.dirname(__FILE__) + '/event'

Okay, Its fixed now. You shouldn't get any conflict now. You don't
need to rename the model, you don't need need to hack the plugin.
Just sync with latest trunk.

I guess this solves all the problems.

Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
own coals.


More information about the Backgroundrb-devel mailing list