Skip to content

Instantly share code, notes, and snippets.

@botanicus
Forked from reactormonk/gist:263753
Created December 25, 2009 21:29
Show Gist options
  • Save botanicus/263756 to your computer and use it in GitHub Desktop.
Save botanicus/263756 to your computer and use it in GitHub Desktop.
require 'rango/mixins/rendering'
class Application < Merb::Controller
include Rango::ExplicitRendering
def scope
@scope ||= begin
super.tap do |scope|
scope.extend(ResourceHelper)
scope.instance_variable_set("@params", self.request.params)
end
end
end
end
module ResourceHelper
# Port from Merb::Controller
def resource(*args)
args << @params
Merb::Router.resource(*args)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment