Skip to content

Instantly share code, notes, and snippets.

@reactormonk
Created December 25, 2009 21:21
Show Gist options
  • Save reactormonk/263753 to your computer and use it in GitHub Desktop.
Save reactormonk/263753 to your computer and use it in GitHub Desktop.
require 'rango/mixins/rendering'
class Application < Merb::Controller
include Rango::ExplicitRendering
def scope
super.extend(ResourceHelper)
end
def context
@context ||= super.merge(params: self.request.params)
end
end
module ResourceHelper
# Port from Merb::Controller
def resource(*args)
args << @context[: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