Greg,

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

--
Andrew Ferk

On Sep 17, 12:02 am, Greg Willits <[email protected]> wrote:
> http://guides.rubyonrails.org/plugins.html#organize-your-files
>
> This has two things that doesn't make sense to me.
>
> 1) it advocates a Rails folder with it's own init.rb in it. AFAICT
> that's an old idiom that no longer applies to Rails 3, but I can't seem
> to find a definitive confirmation on that.
>
> 2) it advocates that /PLUGIN/init.rb should include
> /PLUGIN/lib/yaffle.rb as the one and only require statement and that
> yaffle.rb should be the file where all the needed require statements be
> written to "keep init.rb clean."
>
> I don't understand the merit of that. How many require statements is not
> clean? 20, 20, 5? If I have 2 requires, I should have a whole separate
> file just to isolate the requires? Is there some other purpose, because
> that just makes no sense.
>
> Looking for insight. Thx.
>
> -- gw
> --
> Posted viahttp://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