Andrew Ferk wrote:
> 
> I spent a lot of time today building a Rails 3 plugin, and
> http://guides.rubyonrails.org/plugins.html is outdated.  I will be
> looking into updating the page for Rails 3.
> 
> Below is the recommended setup, where init.rb requires only lib/
> plugin.rb.  I'm not 100% positive, but I believe it is done this way
> to conform to the Rails Engine.
> 
> /PLUGIN/init.rb
> /PLUGIN/lib/plugin.rb

Thanks. Could init.rb include anything other than the require? Perhaps 
the definition of some constants? Or would you do everything in 
/lib/plugin.rb?

Also, how would you deal with a case where the name of the plugin might 
be SpiffyUser, and you have /plugins/spiffy_user/lib/spiffy_user.rb 
where I would want a class file named spiffy_user.rb -- seems now like 
we want to use spiffy_user.rb for two things. Plugin init and a primary 
class file for the plugin.

I guess I just have to come up with another name for one of them, but 
it's not really ideal to have to do that I think. Or, let's just say 
under the old system I didn't have to when we could have the actual init 
stuff in init.rb

Sure seems like there should be /PLUGIN/lib/init.rb

-- gw
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to