Posts Tagged ‘developer’

Release 0.2.0

Tuesday, March 11th, 2008

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:

  • ticket: 3 Render url in Controllers/Views
  • ticket: 5 Render Extension System.