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:
parent
61903b534a
commit
5d86327e4d
2 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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!
|
||||
|
|
Loading…
Reference in a new issue