> I am after the side effect here. It is a method that is supposed to be > called only once. Subsequent calls will do nothing. Returning false seem > like the cleanest option. But that is not enough feedback for the user, as > it might return false because it was already called or because some > condition failed. I am just trying to find the most user friendly pattern > for this. > > > If the User object knows whether it's already done something I don't see the need for the "only call once" rule. Idempotence is a great thing to strive for.
-- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/rails-oceania?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
