lib/restfulness/request.rb in restfulness-0.2.3 vs lib/restfulness/request.rb in restfulness-0.2.4
- old
+ new
@@ -71,9 +71,14 @@
def sanitized_params
# Note: this returns nil if #params has not been called
@sanitized_params ||= @params ? Sanitizer.sanitize_hash(@params) : nil
end
+ # Provide a wrapper for the http_accept_language parser
+ def http_accept_language
+ @http_accept_language = HttpAcceptLanguage::Parser.new(headers[:accept_language])
+ end
+
[:get, :post, :put, :patch, :delete, :head, :options].each do |m|
define_method("#{m}?") do
action == m
end
end