rails_best_practices
rails_best_practices copied to clipboard
Bug in Rails 4.0.2 migration passing options to "add_column".
Same result on change_column. The following migration:
add_column :users, :admin, :boolean, { default: false, null: false }
causes the following error:
wrong number of arguments (2 for 1)/Users/me/.rvm/gems/ruby-2.0.0-p353@myapp/gems/rails_best_practices-1.15.0/lib/rails_best_practices/core_ext/object.rb:7:in `try'
That line of code in the gem is this declaration:
def try(method_symbol)
When I remove the gem from my Gemfile, migration worked.
That's a known bug I accidentally introduced in 1.15.0. Try 1.15.1 See #202
Thanks! Just upgraded and fixed.