-
-
Save bsodmike/1068376 to your computer and use it in GitHub Desktop.
Rails. Render a layout outside a controller, with text and locals
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| av = ActionView::Base.new(Rails::Configuration.new.view_path) | |
| av.render( | |
| {:text => this_goes_to_yield, :layout => "layouts/blah.html.erb"}, # the options hash | |
| {:title => 'blah', :body => 'hello'} # the locals hash | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment