Code, Strings, and Keys

    • About Thomas Powell
    • Account
    • It’s been [0] days since [program] last updated
    • Login
    • Password Reset
    • Pianist / Accompanist / Music Director Resume
    • Reading List 2025
    • Register
    • Running Gear – Shoes, Treadmill, and Bandages
    • Site Map
Illustration of a bird flying.
  • Passing Additional Arguments to FactoryGirl Factories

    I wanted to create a factory that would link various states to my model, but from a specified list instead of automatically generated. I discovered that these are transient attributes: FactoryGirl.define do factory :business do name “MyString” # # # trait :with_states do ignore do state_list [] end # add association equal to state code…

    April 24, 2014
  • 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:…

    April 23, 2014
  • 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…

    April 23, 2014
←Previous Page
1 … 76 77 78 79 80 … 312
Next Page→

Code, Strings, and Keys

Proudly powered by WordPress