The same rails guides like you pasted before shows a simple example of
"just a plugin" when it just extends the core class String.

As for the differences between Railties and Engines, I'll  quote the
docs (http://guides.rubyonrails.org/engines.html):
"A Rails::Engine is nothing more than a Railtie with some initializers
already set. And since Rails::Application and Rails::Plugin are
engines, the same configuration described here can be used in all
three."

And extracting from the Engine doc:
"it will automatically load models, controllers and helpers inside
app, load routes at config/routes.rb, load locales at
config/locales/*, and load tasks at lib/tasks/*."

I think it will also add lib/assets to the assets path nowadays, but
the doc might be outdated.

On Tue, Jun 5, 2012 at 3:21 PM, Rodrigo Rosenfeld Rosas
<rr.ro...@gmail.com> wrote:
>
> Em 05-06-2012 15:05, Luiz Felipe Garcia Pereira escreveu:
>
>> One word: Modularity
>>
>> If it's a simple plugin, it doesn't need to be a Railtie and inserted in 
>> rails
>
>
> Could you please explain the differences about this and a regular Ruby gem?
>
>
>> If it's something that extends rails/AR it can be a Railtie and take 
>> advantage of that.
>> If it's an engine then it makes sense to add the Engine and have the extra 
>> tools Rails::Engine provides.
>
>
> What kind of improvements/benefits would you expect by using the former 
> instead of the latter?
>
> If there is no real benefit, it would be better to always create an engine 
> and avoid user's confusion.
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Core" group.
> To post to this group, send email to rubyonrails-core@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-core+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-core?hl=en.
>



--
Luiz Felipe G. Pereira

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to