Method: ActionView::Helpers::InstanceTag#to_tag_with_enumerated_attribute

Defined in:
lib/enumerated_attribute/rails_helpers.rb

#to_tag_with_enumerated_attribute(options = {}) ⇒ Object



76
77
78
79
80
81
82
83
84
85
# File 'lib/enumerated_attribute/rails_helpers.rb', line 76

def to_tag_with_enumerated_attribute(options={})
	#look for an enum
	if (column_type == :string && 
		self.object.class.respond_to?(:has_enumerated_attribute?) &&
		self.object.class.has_enumerated_attribute?(method_name.to_sym)) 
		to_enum_select_tag(options)
	else
		to_tag_without_enumerated_attribute(options)
	end
end