1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

move is_navigational_format? and request_format methods to helpers

This commit is contained in:
Vasiliy Ermolovich 2012-11-05 09:54:22 +03:00
parent 61903b534a
commit 5d86327e4d
2 changed files with 8 additions and 8 deletions

View file

@ -181,12 +181,4 @@ MESSAGE
format.any(*navigational_formats, &block)
end
end
def request_format
@request_format ||= request.format.try(:ref)
end
def is_navigational_format?
Devise.navigational_formats.include?(request_format)
end
end

View file

@ -267,6 +267,14 @@ module Devise
super # call the default behaviour which resets the session
end
def request_format
@request_format ||= request.format.try(:ref)
end
def is_navigational_format?
Devise.navigational_formats.include?(request_format)
end
private
def expire_devise_cached_variables!