Class: ActiveRecord::ConnectionAdapters::QuickBaseColumn

Inherits:
Column
  • Object
show all
Defined in:
lib/quickbase_adapter.rb

Overview

Rails-friendly definition of a QuickBase column

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fieldAttributes) ⇒ QuickBaseColumn

Returns a new instance of QuickBaseColumn.



58
59
60
61
62
63
# File 'lib/quickbase_adapter.rb', line 58

def initialize(fieldAttributes)
   @quickBaseFieldAttributes = fieldAttributes
   super(@quickBaseFieldAttributes ["columnName"],@quickBaseFieldAttributes["default_value"],fieldType())
   primary = @quickBaseFieldAttributes["primary"] 
   @quickBaseFieldAttributes["decimalPrecision"] ||= "38"
end

Instance Attribute Details

#quickBaseFieldAttributesObject

Returns the value of attribute quickBaseFieldAttributes.



56
57
58
# File 'lib/quickbase_adapter.rb', line 56

def quickBaseFieldAttributes
  @quickBaseFieldAttributes
end

Instance Method Details

#human_nameObject



69
70
71
# File 'lib/quickbase_adapter.rb', line 69

def human_name
   @quickBaseFieldAttributes["quickBaseFieldName"]
end

#nameObject



65
66
67
# File 'lib/quickbase_adapter.rb', line 65

def name
   @name.downcase.gsub( /\W/, "_" )
end