3 ms·
What a cool and elegant way of publishing a tiny gem! However, I will say that I personally prefer to stay away from gems like this, as they add indirection, a
by andrewvc 15y ago
What a cool and elegant way of publishing a tiny gem!
However, I will say that I personally prefer to stay away from gems like this, as they add indirection, and make projects confusing for new devs.
I would say that
bang :calculate_score => :score
is clearly worse than
def calculate_score!; update_attributes!(:score => calculate_score) end
Sure, it is longer, but any ruby / rails dev will understand it instantly, and I'll take a few more chars for less indirection.