Sha256: 457abeba6a1356203343f0d71261edcc67aede59587d55a84e5b66e31429909d

Contents?: true

Size: 624 Bytes

Versions: 16

Compression:

Stored size: 624 Bytes

Contents

module ActiveExt
  module DataStructures
    class Column
      attr_accessor :name, :association, :column, :options

      def initialize(name, active_record_class)
        @name = name.to_sym
        @column = active_record_class.columns_hash[self.name.to_s]
        @association = active_record_class.reflect_on_association(self.name)
        @active_record_class = active_record_class
        @table = active_record_class.table_name
        #set default options
        @options = {:required => false, :readonly => false}
      end

      def sql_type
        @column.type
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
erp_app-4.0.0 lib/active_ext/data_structures/column.rb
erp_app-3.1.16 lib/active_ext/data_structures/column.rb
erp_app-3.1.15 lib/active_ext/data_structures/column.rb
erp_app-3.1.14 lib/active_ext/data_structures/column.rb
erp_app-3.1.13 lib/active_ext/data_structures/column.rb
erp_app-3.1.12 lib/active_ext/data_structures/column.rb
erp_app-3.1.11 lib/active_ext/data_structures/column.rb
erp_app-3.1.10 lib/active_ext/data_structures/column.rb
erp_app-3.1.9 lib/active_ext/data_structures/column.rb
erp_app-3.1.8 lib/active_ext/data_structures/column.rb
erp_app-3.1.7 lib/active_ext/data_structures/column.rb
erp_app-3.1.6 lib/active_ext/data_structures/column.rb
erp_app-3.1.5 lib/active_ext/data_structures/column.rb
erp_app-3.1.4 lib/active_ext/data_structures/column.rb
erp_app-3.1.3 lib/active_ext/data_structures/column.rb
erp_app-3.1.2 lib/active_ext/data_structures/column.rb