Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
10/19/12: Super Happy Blogging Friday

Interestings

  • accepts_nested_attributes and validates_presense_of on association id fails without inverse_of

Having a validation that the association id is present when trying to use nested attributes fails because the child object is validated before the parent object in memory has an id.

However, if you decorate the association with :inverse_of, it tells Rails to look in memory first which both saves memory and allows Rails to build the graph of objects correctly with validation!

Yay inverse_of!

Events

  • Super Happy Dev House in SF tomorrow

Mother of all hack days. They’re usually down in the valley! http://shdh52.eventbrite.com/

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *