class Spectifly::Sequel::Field

Public Instance Methods

for_new_migration(model, entity_references = []) click to toggle source

The entity_references param is the list of entity namesthat the caller knows about. This lets us figure out whether the field should actually be the id of the entity/model being referenced by the field type.

# File lib/spectifly/sequel/field.rb, line 16
def for_new_migration(model, entity_references = [])
  @field_for_migration = Spectifly::Sequel::FieldForMigration.new(self, model, entity_references)
  @field_for_migration.render
end
type() click to toggle source
Calls superclass method
# File lib/spectifly/sequel/field.rb, line 4
def type
  field_type = super
  if base_type = Spectifly::Sequel::Types::Extended[field_type]
    field_type = base_type['Type']
  end

  Spectifly::Support.camelize(field_type)
end