[Rails] Controller helper_methods in template

2012-12-03 Thread amkirwan
I'm trying to render a rails form using HAML outside of the normal Rails flow using the code below: template = File.join("#{Rails.root}", 'lib', 'templates') context = ActionView::Base.new(template, {}, @controller, nil) context.class_eval do include Rails.application.routes.url_helper

[Rails] Rails 3.1 PDF Render

2010-11-17 Thread amkirwan
plugin is located at https://github.com/amkirwan/too_rendermonkey. I understand in Rails 3 alias_method_chain is gone and I should use ActionController::Renderers.add. I've looked at the example at but I can't seem to get it to work http://www.engineyard.com/blog/2010/render-options-in-rails-3