On Apr 14, 2010, at 4:06 PM, Fearless Fool wrote:
Philip Hallstrom wrote:
Are you going to check for that condition *every* time you create
that
model? In scripts, via the console, somewhere else in the code?
If you remove that constraint you'll need to remember this every
time... and at some point you'll forget. I always do :/
I'd leave it alone if it were me.
-p
Point well taken. Right now, that's the only code that modifies the
Station table, and I'm doing a massive (initial) load and update --
removing the constraint really does speed things up. But heeding your
advice, I'll reinstate the constraint after this initial load
finishes.
(What? Of COURSE I'll remember! :)
:) You could also do my_model_instance.save(false) which would bypass
the validations entirely. As long as you're sure your initial data
load is legit.
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.