module MakeRestful::ControllerAdditions::OauthResource require 'oauth_resource' extend ActiveSupport::Concern included do ; end module ClassMethods def authorize_resource!(token, opts={}) skip_before_filter :load_instance, :load_collection before_filter(opts) do @resource = @resource.authorize(send(token)) load_instance if params[:action] =~ /show|destroy|update/ load_collection if params[:action] =~ /index/ end end end end