Skip to content

Commit aed6f80

Browse files
committed
Disable form_for routes
1 parent 50df089 commit aed6f80

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/active_interaction/extras.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ def form_for(field_name)
4848
model_name.singular_route_key = klass.model_name.singular_route_key
4949
end
5050

51+
# TODO: Routes reload is broken in Dev
5152
# Resolve form object route to object
5253
# e.g. resolve "User::Form" { |form| form.user }
53-
Rails.application.config.after_routes_loaded do |app|
54-
app.routes.add_polymorphic_mapping(name, {}) do |form|
55-
form.send(field_name)
56-
end
57-
end
54+
# Rails.application.config.after_routes_loaded do |app|
55+
# app.routes.add_polymorphic_mapping(name, {}) do |form|
56+
# form.send(field_name)
57+
# end
58+
# end
5859
end
5960
end
6061
end

0 commit comments

Comments
 (0)