Class: Field::Telephone

Inherits:
Base
  • Object
show all
Defined in:
lib/field/telephone.rb

Instance Attribute Summary

Attributes inherited from Base

#form, #name, #options

Instance Method Summary collapse

Methods inherited from Base

factory, #initialize, #inject_attributes, #presenter_class, #setup_container, #value

Constructor Details

This class inherits a constructor from Field::Base

Instance Method Details

#attributeObject



12
13
14
# File 'lib/field/telephone.rb', line 12

def attribute
  ::Attribute::Telephone
end

#inject_validationsObject



6
7
8
9
10
# File 'lib/field/telephone.rb', line 6

def inject_validations
  @container.validates name, telephone: true

  super
end