Skip to content

Commit

Permalink
Merge pull request rails#21282 from sjain1107/added_docs
Browse files Browse the repository at this point in the history
Added docs for TableDefinition #coloumns & #remove_column [ci skip]
  • Loading branch information
senny committed Aug 19, 2015
2 parents 7187339 + c351a82 commit 0a17e8c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ def initialize(types, name, temporary, options, as = nil)
@name = name
end

# Returns an array of ColumnDefinition objects for the columns of the table.
def columns; @columns_hash.values; end

# Returns a ColumnDefinition for the column with name +name+.
Expand Down Expand Up @@ -369,6 +370,8 @@ def column(name, type, options = {})
self
end

# remove the column +name+ from the table.
# remove_column(:account_id)
def remove_column(name)
@columns_hash.delete name.to_s
end
Expand Down

0 comments on commit 0a17e8c

Please sign in to comment.