Fix default options argument on ActiveRecord::ConnectionAdaptors::Table#column_exists? #1763

Merged
merged 1 commit into from Jun 19, 2011

2 participants

@grantneufeld

Changed the default value for the options argument on ActiveRecord::ConnectionAdapters::Table#column_exists? from nil to an empty Hash {}.

That method calls through to ActiveRecord::ConnectionAdapters::SchemaStatements#column_exists? which expects options to be a Hash.

When options was nil, an error would occur in cases where the column did exist because the called method attempted to perform a key lookup on options.

@grantneufeld grantneufeld Changed the default value for the options argument on ActiveRecord::C…
…onnectionAdapters::Table#column_exists? from nil to an empty Hash {}.

That method calls through to ActiveRecord::ConnectionAdapters::SchemaStatements##column_exists? expects options to be a Hash.

When options was nil, an error would occur in cases where the column did exist because the called method attempted to perform a key lookup on options.
3cc83a8
@josevalim josevalim merged commit 7d46061 into rails:master Jun 19, 2011
@josevalim
Ruby on Rails member

Could you please provide a pull request for 3-1-stable?

@josevalim josevalim merged commit 3cc83a8 into rails:master Jun 19, 2011
@jake3030 jake3030 pushed a commit to jake3030/rails that referenced this pull request Jun 28, 2011
@audiodude audiodude Ensure number_to_human_size does not strip zeros from the end [#1763
…state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
98eaa2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment