A couple of really cool features in this release. In controllers and views you canĀ now call:
render(:url=> "http://www.mycoolurl.com")
Developers can now also develop their own custom rendering systems, without monkey patching the core:
class Mack::Rendering::Pdf < Mack::Rendering::Base
def render
# do work to render stuff as a PDF
end
end
Now add this to the list of available render systems:
app_config.mack.rendering_systems << :pdf
You should now be able to do this in your controller:
class MyAwesomeController < Mack::Controller::Base
def pdf
render(:pdf => "my_pdf_template")
end
end
Install:
$ sudo gem install mack
Changelog: