Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created August 20, 2012 17:19
Show Gist options
  • Save ahoward/3405928 to your computer and use it in GitHub Desktop.
Save ahoward/3405928 to your computer and use it in GitHub Desktop.
rendering outside a controller
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