def find_resource(controller)
      (controller.enclosing_resource ? controller.enclosing_resource.send(source) : klass).find controller.params[key]
    end
def find_resource(controller)
      (controller.enclosing_resource ? controller.enclosing_resource.send(source) : klass).find controller.params[key]
    end
finds the resource on a controller using enclosing resources or resource class