Sha256: 703bb2ba1dde19536b9c00b8d6fdff93064444dfd85c05fb420996a7a60344eb

Contents?: true

Size: 469 Bytes

Versions: 1

Compression:

Stored size: 469 Bytes

Contents

require 'active_record/connection_adapters/abstract_adapter'

module ActiveRecord
  module ConnectionAdapters
    class TableDefinition

      def person_name(name, *args)
        options = args.extract_options!
        name_parts = PersonName::NameSplitter::NAME_PARTS
        name_parts.each do |part|
          column("#{name}_#{part}".to_sym, :string, :null => true)
        end
        column("#{name}".to_sym, :string, :null => true)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
person-name-0.2.5 lib/person_name/migration_support.rb