Hello,
I need to render erb template WITH LAYOUT OUTSIDE REQUEST, for example
to generate document in background process.
How can I do this? I know that I can do ActionView::Base.new ... but its
possible to have also layout?
Code w/o layout support:
def return_string_to_me_baby
x = ActionView::Base.new(['app/views'])
# assign template variables
assigns.each do |k,v|
x.assigns[k] = v
end
x.render template
end
Thanks!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---