Skip to content
Browse files

Merge pull request #1953 from ka8725/master

Use request_format method instead of direct code
  • Loading branch information...
2 parents caa8961 + 972ac3b commit 6c80839e7b312f89bf7fbad266ee7df05cd47dd4 @josevalim josevalim committed Jun 26, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/controllers/devise_controller.rb
View
4 app/controllers/devise_controller.rb
@@ -72,7 +72,7 @@ def assert_is_devise_resource! #:nodoc:
2) You are testing a Devise controller bypassing the router.
If so, you can explicitly tell Devise which mapping to use:
-
+
@request.env["devise.mapping"] = Devise.mappings[:user]
MESSAGE
@@ -187,6 +187,6 @@ def request_format
end
def is_navigational_format?
- Devise.navigational_formats.include?(request.format.try(:ref))
+ Devise.navigational_formats.include?(request_format)
end
end

0 comments on commit 6c80839

Please sign in to comment.
Something went wrong with that request. Please try again.