RailsCasts Pro episodes are now free!

Learn more or hide this

Jeremy Raines's Profile

GitHub User: jraines

Site: http://JeremyRaines.com

Comments by Jeremy Raines

Avatar

No it's not a bug.

The only configs that are scoped to the engine are load_paths, eager_load_paths, and load_once_paths

Avatar

It seems that configuration you place inside lib/uhoh/engine.rb will affect your main app's configuration at test/dummy/config/application.rb

I did this in my engine:

ruby
config.generators.do |g|
   g.template_engine :haml
end

And now the main app uses haml for scaffold generation. That seems pretty counterintuitive, since it is within the class of the engine; think that's a bug I should file on Rails?

Avatar

I was just playing around with this and noticed that the url helper prefixing seems to have changed. I am on Rails 3.1 rc5, but had to downgrade to Arel 2.1.4 to get things launched (which wouldn't seem to make a difference w/r/t this)

ruby
# undefined variable uhoh_engine
link_to  'Engine home', uhoh_engine.root_url

#works
link_to 'Engine home', uhoh.root_url