Sha256: 31ecdbfd745db3f6bccc35fc93abb8fc837a871f6f06b1673440e33fb87de900

Contents?: true

Size: 469 Bytes

Versions: 8

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!
        column("#{name}".to_sym, :string, :null => true)
        name_parts = PersonName::NameSplitter::NAME_PARTS
        name_parts.each do |part|
          column("#{name}_#{part}".to_sym, :string, :null => true)
        end
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
person-name-0.2.13 lib/person_name/migration_support.rb
person-name-0.2.12 lib/person_name/migration_support.rb
person-name-0.2.11 lib/person_name/migration_support.rb
person-name-0.2.10 lib/person_name/migration_support.rb
person-name-0.2.9 lib/person_name/migration_support.rb
person-name-0.2.8 lib/person_name/migration_support.rb
person-name-0.2.7 lib/person_name/migration_support.rb
person-name-0.2.6 lib/person_name/migration_support.rb