File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ require "phlex/rails"
2+
13module Superform
24 module Rails
35 # The `ApplicationComponent` is the superclass for all components in your application.
@@ -14,6 +16,9 @@ module Rails
1416 # The `Form` component also handles Rails authenticity tokens via the `authenticity_toklen_field`
1517 # method and the HTTP verb via the `_method_field`.
1618 class Form < Component
19+ include Phlex ::Rails ::Helpers ::FormAuthenticityToken
20+ include Phlex ::Rails ::Helpers ::URLFor
21+
1722 attr_accessor :model
1823
1924 delegate \
@@ -115,7 +120,7 @@ def authenticity_token_field
115120 input (
116121 name : "authenticity_token" ,
117122 type : "hidden" ,
118- value : helpers . form_authenticity_token
123+ value : form_authenticity_token
119124 )
120125 end
121126
@@ -144,7 +149,7 @@ def resource_action
144149 end
145150
146151 def form_action
147- @action ||= helpers . url_for ( action : resource_action )
152+ @action ||= url_for ( action : resource_action )
148153 end
149154
150155 def form_method
You can’t perform that action at this time.
0 commit comments