Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    50% of Ruby programming is about hash manipulation - I'd argue that only 10% is hash manipulation, another 10% is figuring out how to write your method on one line, and 80% is bragging about how great Ruby is. :) Commented Jun 19, 2015 at 20:37
  • Thanks, maxcal. I ended up needing the one liner from another answer. I'm using FactoryGirl already but the point of the test is whether the API creates the record. I'll second that 80%, zetetic! Commented Jun 19, 2015 at 23:52
  • Then you can do FactoryGirl.attributes_for(:product, organization_type: "ABC") Commented Jun 20, 2015 at 2:51