mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Don't use config option for flashing_formats
This commit is contained in:
parent
c87809a0f5
commit
fe1fb1f7a2
4 changed files with 3 additions and 13 deletions
|
@ -209,10 +209,6 @@ module Devise
|
||||||
mattr_accessor :navigational_formats
|
mattr_accessor :navigational_formats
|
||||||
@@navigational_formats = ["*/*", :html]
|
@@navigational_formats = ["*/*", :html]
|
||||||
|
|
||||||
# Which formats should display flash messages.
|
|
||||||
mattr_accessor :flashing_formats
|
|
||||||
@@flashing_formats = nil
|
|
||||||
|
|
||||||
# When set to true, signing out a user signs out all other scopes.
|
# When set to true, signing out a user signs out all other scopes.
|
||||||
mattr_accessor :sign_out_all_scopes
|
mattr_accessor :sign_out_all_scopes
|
||||||
@@sign_out_all_scopes = true
|
@@sign_out_all_scopes = true
|
||||||
|
|
|
@ -291,8 +291,10 @@ module Devise
|
||||||
Devise.navigational_formats.include?(request_format)
|
Devise.navigational_formats.include?(request_format)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Check if flash messages should be emitted. Default is to do it on
|
||||||
|
# navigational formats
|
||||||
def is_flashing_format?
|
def is_flashing_format?
|
||||||
(Devise.flashing_formats || Devise.navigational_formats).include?(request_format)
|
is_navigational_format?
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -221,10 +221,6 @@ Devise.setup do |config|
|
||||||
# The "*/*" below is required to match Internet Explorer requests.
|
# The "*/*" below is required to match Internet Explorer requests.
|
||||||
# config.navigational_formats = ['*/*', :html]
|
# config.navigational_formats = ['*/*', :html]
|
||||||
|
|
||||||
# Lists the formats that should display flash messages. Inherits
|
|
||||||
# navigational_formats if falsy
|
|
||||||
# config.flashing_formats = nil
|
|
||||||
|
|
||||||
# The default HTTP method used to sign out a resource. Default is :delete.
|
# The default HTTP method used to sign out a resource. Default is :delete.
|
||||||
config.sign_out_via = :delete
|
config.sign_out_via = :delete
|
||||||
|
|
||||||
|
|
|
@ -162,10 +162,6 @@ Devise.setup do |config|
|
||||||
# should add them to the navigational formats lists. Default is [:html]
|
# should add them to the navigational formats lists. Default is [:html]
|
||||||
# config.navigational_formats = [:html, :iphone]
|
# config.navigational_formats = [:html, :iphone]
|
||||||
|
|
||||||
# Lists the formats that should display flash messages. Inherits
|
|
||||||
# navigational_formats if falsy
|
|
||||||
# config.flashing_formats = nil
|
|
||||||
|
|
||||||
# The default HTTP method used to sign out a resource. Default is :get.
|
# The default HTTP method used to sign out a resource. Default is :get.
|
||||||
# config.sign_out_via = :get
|
# config.sign_out_via = :get
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue