In Engines::Plugin we have:

module Engines
   class Plugin < Rails::Plugin
       # ...
       def default_code_paths
         %w(app/controllers app/helpers app/models components lib)
       end

which is great because now one can overwrite this in environment.rb  
(after Engines has "booted"):

Engines::Plugin.class_eval do
   def default_code_paths
     %w(app/controllers app/helpers app/models app/observers  
components lib)
   end
end

Wouldn't it make even more sense to just use cattr_accessors for these  
defaults?

Along the lines of:

module Engines
   class Plugin < Rails::Plugin
       @@default_code_paths = %w(app/controllers app/helpers app/ 
models components lib)
       cattr_accessor :default_code_paths

Redefining the default_code_paths would then be a little less clumpsy:

Engines::Plugin.default_code_paths = %w(app/controllers app/helpers  
app/models app/observers components lib)

Hu?

--
sven fuchs                      [EMAIL PROTECTED]
artweb design           http://www.artweb-design.de
grünberger 65           + 49 (0) 30 - 47 98 69 96 (phone)
d-10245 berlin          + 49 (0) 171 - 35 20 38 4 (mobile)



_______________________________________________
Engine-Developers mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org

Reply via email to