vendor/plugins/assert_request/lib/method_rules.rb
# Check the given request method. Raises an exception if it is invalid.
Check the given request method. Raises an exception if it is invalid.
Check the given request method . Raises an exception if it is invalid .
def validate(method)
      requirements = @requirements.empty? ? [:get] : @requirements
      unless requirements.include? method
        raise RequestError, "request method #{method} is not permitted"
      end      
    end
def validate ( method ) requirements = @requirements . empty? ? [ :get ] : @requirements unless requirements . include? method raise RequestError , "request method #{method} is not permitted" end end
Check the given request method.
Check the given request method .
# If no requirements were specified, presume GET.
method