提交 14198d84 编写于 作者: S Santiago Pastorino

Remove InstanceTagMethods module and define the methods inside the InstanceTag class

上级 12f5158f
......@@ -858,8 +858,7 @@ def instantiate_builder(record, record_object = nil, options = nil, &block)
end
end
module InstanceTagMethods #:nodoc:
extend ActiveSupport::Concern
class InstanceTag
include Helpers::CaptureHelper, Context, Helpers::TagHelper, Helpers::FormTagHelper
attr_reader :object, :method_name, :object_name
......@@ -1025,7 +1024,7 @@ def value_before_type_cast(object)
self.class.value_before_type_cast(object, @method_name)
end
module ClassMethods
class << self
def value(object, method_name)
object.send method_name if object
end
......@@ -1111,10 +1110,6 @@ def sanitized_method_name
end
end
class InstanceTag
include InstanceTagMethods
end
class FormBuilder
# The methods which wrap a form helper call.
class_attribute :field_helpers
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册