Module: PhoneNumber::ActiveRecordExtensions::ClassMethods
- Defined in:
- lib/phone_number/active_record_extensions.rb
Instance Method Summary collapse
Instance Method Details
#initialize_compositions(attrs) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/phone_number/active_record_extensions.rb', line 19 def initialize_compositions( attrs ) attrs.each do |attr| composed_of attr, :class_name => 'PhoneNumber::Number', :mapping => ["raw_#{attr}", 'raw'], :converter => :convert, :allow_nil => true end end |