-
Rails 4, Empty Hashes, Strong Parameters, exception_notification and filtering out my new ActionController::ParameterMissing errors
I’m finally coming around to the “strong parameters” pattern encouraged (required?) in Rails 4. One thing that I did notice was that missing the base parameter raised an ActionController::ParameterMissing error. I discovered this via controllers tests generated by rspec-rails when I created a controller scaffold, which generates tests for “Invalid Params”: In the controller spec:…
-
Bundler reports errors across several different projects when running `bundle install`
When running bundle install, I was getting the following for several projects: Bundler gave the error “Could not find {gem_name_version} in any of the sources” while processing “{project_path}/Gemfile”. Perhaps you forgot to run “bundle install”? . . . I found someone else was having the same problem too. In my case, I had uninstalled and…
-
method_missing: undefined method `increment_open_transactions` database_cleaner
When using database_cleaner (0.9.1) with rails (4.1.0) {my home path}/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activerecord-4.1.0/lib/active_record/dynamic_matchers.rb:26:in `method_missing’: undefined method `increment_open_transactions’ for ActiveRecord::Base:Class (NoMethodError) from {my home path}/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/transaction.rb:13:in `start’ from {my home path}/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/database_cleaner-0.9.1/lib/database_cleaner/base.rb:73:in `start’ from {my home path}/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:75:in `block in start’ from {my home path}/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:75:in `each’ from {my home path}/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:75:in `start’ Somehow we were using an old version of database_cleaner, gem “database_cleaner”,…