Please sign in to comment.
Project: Refactor before_save callback and tests.
The before_save on: :create callback doesn't do what one might think. Rails silently ignores the on: :create option for before_save, so this is no different than a plain before_save. See: rails/rails#17622 rails/rails#30919 Refactor the tests, to make them a little more explicit and descriptive. Add latitude and longitude to the factory, so that new instances are valid.
- Loading branch information...
Showing with 21 additions and 17 deletions.