Question

According to the Ruby on Rails 2.3 Release Notes...

if your plugin has an app folder, then app/[models|controllers|helpers] will automatically be added to the Rails load path. Engines also support adding view paths now, and ActionMailer as well as Action View will use views from engines and other plugins.

There is supposed to be some way to make Rails aware of the app/views of your Rails engine, in 2.3. However, there is virtually no documentation on how this feature really works, that I can seem to find.

Can anyone help me get my view paths working from the context of a Rails Engine scenario?

IMPORTANT: The big issue is not with views as much as it is with partials. I need to be able to load partials from the view path of a rails engine.

Thanks!!

Was it helpful?

Solution

Turns out, I just needed to restart. This is done automatically by virtue of me defining a proper views directory within the nested app.

Durr!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top