Created
August 20, 2012 17:19
-
-
Save ahoward/3405928 to your computer and use it in GitHub Desktop.
rendering outside a controller
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.application.config.paths['app/views'].first) | |
### av.controller = Current.mock_controller # gem install rails_current | |
av.render( :locals => {:model => Model.first}, :partial => "shared/model" ) #=> string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment