Skip to content

Commit

Permalink
Cleans up array implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan McClain committed May 8, 2012
1 parent 34a8290 commit 20cc90e
Showing 1 changed file with 3 additions and 13 deletions.
Expand Up @@ -81,21 +81,11 @@ def #{column_type}(*args) # def string(*args)
end

def column(name, type=nil, options = {})
name = name.to_s
type = type.to_sym
super

column = self[name] || new_column_definition(@base, name, type)

limit = options.fetch(:limit) do
native[type][:limit] if native[type].is_a?(Hash)
end

column.limit = limit
column.precision = options[:precision]
column.scale = options[:scale]
column.default = options[:default]
column.null = options[:null]
column = self[name]
column.array = options[:array]

self
end

Expand Down

0 comments on commit 20cc90e

Please sign in to comment.