How can I use my main projects layout for my sub apps?
There is a layout option for the controller.. but what would I set the value to in order for it to traverse back into the parent project and use it's application.haml instead?
I tried adding:
File.expand_path('../../app/views/layouts/application.haml', __FILE__)
Unfortunately in the controller it looks like the path of the current apps layouts folder is always added onto the front of it so you end up with something like
c:/sites/demo/app01/views/layouts/c:/sites/demo/app/views/layouts/application.haml
Also, the .haml is already added so if you do add it to the controller you end up with
application.haml.haml
That is only the case for the controller.
Based on those results I moved the code into the sub app.rb, which is actually better for my situation.
However, no main layout is rendered so I only see the results of the current controller action. It doesn't output the layout.
I tried it without the file ext, with etc.. The path being returned is right.. so I'm not sure why it's not using it?
At least in the controller, it was throwing an error because it was an invalid argument.
Having the code in the app.rb for my sub app doesn't produce an error, but it doesn't render the layout either. Just the view result.