Hey All As I started to use the new Rails Template Runner functionality (thanks to lifo + jeremymcanally - it's really awesome) I realized some small missing methods that could make the template a lot more powerful. One in particular was really already there - just embedded within another method.
I just submitted a patch: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1613-adding-environment-to-new-template_runner That extracts the functionality for adding 'config.gem' to the Rails::Initializer block to its own method #environment. The strongest use-case for this is adding or configuring load paths - e.g. environment "config.load_paths += %w[\#{Rails.root}/app/mailers \# {Rails.root}/app/observers]" It could also be used for adding observers: environment "config.active_record.observers = :user_observer" Or setting any arbitrary config method. Heres the patch for easy viewing on github: http://github.com/quirkey/rails/commit/6947592c772c67d4fdbaf397c6736eaa3be69363 Thanks! --AQ --~--~---------~--~----~------------~-------~--~----~ 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 [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-core?hl=en -~----------~----~----~----~------~----~------~--~---
