Skip to content

Commit

Permalink
Merge pull request #1953 from ka8725/master
Browse files Browse the repository at this point in the history
Use request_format method instead of direct code
  • Loading branch information
José Valim committed Jun 26, 2012
2 parents caa8961 + 972ac3b commit 6c80839
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/devise_controller.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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.