Open ClearlyClaire opened 2 years ago
I believe the following change addresses the issue, but I have not tested this under any other version of Rails:
diff --git a/lib/devise/rails/routes.rb b/lib/devise/rails/routes.rb
index 004b9857..c79abb59 100644
--- a/lib/devise/rails/routes.rb
+++ b/lib/devise/rails/routes.rb
@@ -235,7 +235,6 @@ module ActionDispatch::Routing
options[:constraints] = (@scope[:constraints] || {}).merge(options[:constraints] || {})
options[:defaults] = (@scope[:defaults] || {}).merge(options[:defaults] || {})
options[:options] = @scope[:options] || {}
- options[:options][:format] = false if options[:format] == false
resources.map!(&:to_sym)
@@ -462,7 +461,7 @@ ERROR
current_scope = @scope.dup
exclusive = { as: new_as, path: new_path, module: nil }
- exclusive.merge!(options.slice(:constraints, :defaults, :options))
+ exclusive.merge!(options.slice(:constraints, :format, :defaults, :options))
if @scope.respond_to? :new
@scope = @scope.new exclusive
Environment
Current behavior
When calling
devise_for
with aformat: false
parameter, i.e.:The generated routes include
(.:format)
:Expected behavior
I would expect
format: false
to result in the following: