if/else is much, much more performant than exception handling. You can
measure this yourself, write a little test program.
Also remember that rescue would “skip” any other code in-between the
raised exception and the rescue code, which may or may not be a bad
update_attributes and save are equivalent, I’d stick with
self.attributes = attributes
Daniel H. wrote:
Out of curiosity, why did you decide to use if/else instead of rescue?
why’d you use
@foo.attributes = params[:foo]
which does the same thing?
Also, forgot to mention in my original email that redirecting the
the controller’s responsibility, not the model’s, which is why the
validation methods don’t allow you to specify what URL to go to when