Skip to content

Commit 14198d8

Browse files
committed
Remove InstanceTagMethods module and define the methods inside the InstanceTag class
1 parent 12f5158 commit 14198d8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

actionpack/lib/action_view/helpers/form_helper.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -858,8 +858,7 @@ def instantiate_builder(record, record_object = nil, options = nil, &block)
858858
end
859859
end
860860

861-
module InstanceTagMethods #:nodoc:
862-
extend ActiveSupport::Concern
861+
class InstanceTag
863862
include Helpers::CaptureHelper, Context, Helpers::TagHelper, Helpers::FormTagHelper
864863

865864
attr_reader :object, :method_name, :object_name
@@ -1025,7 +1024,7 @@ def value_before_type_cast(object)
10251024
self.class.value_before_type_cast(object, @method_name)
10261025
end
10271026

1028-
module ClassMethods
1027+
class << self
10291028
def value(object, method_name)
10301029
object.send method_name if object
10311030
end
@@ -1111,10 +1110,6 @@ def sanitized_method_name
11111110
end
11121111
end
11131112

1114-
class InstanceTag
1115-
include InstanceTagMethods
1116-
end
1117-
11181113
class FormBuilder
11191114
# The methods which wrap a form helper call.
11201115
class_attribute :field_helpers

0 commit comments

Comments
 (0)