module Avo::Fields::FieldExtensions::HasFieldName

def field_name(name)

Set the field name
def field_name(name)
  @field_name_attribute = name
end

def field_name_attribute

Get the field name
def field_name_attribute
  @field_name_attribute
end

def get_field_name

Get the field name from outside
def get_field_name
  return field_name_attribute if field_name_attribute.present?
  self.to_s.demodulize.underscore.gsub '_field', ''
end