Sha256: 80d1ac54a54ae1c79c984f701ad8c97e3f3f848d9d51cd60e70b21420ef41d0e
Contents?: true
Size: 473 Bytes
Versions: 161
Compression:
Stored size: 473 Bytes
Contents
module Avo module Fields module Concerns module HasFieldName extend ActiveSupport::Concern class_methods do def field_name(name) self.field_name_attribute = name end # Get the field name def get_field_name return field_name_attribute if field_name_attribute.present? to_s.demodulize.underscore.gsub "_field", "" end end end end end end
Version data entries
161 entries across 161 versions & 1 rubygems