2 ms·
It's a question of taste. Some people's taste works like this: If it's in Rails, it must be the right thing to use. Other people's taste works like this: #try i
by raganwald 15y ago
It's a question of taste. Some people's taste works like this: If it's in Rails, it must be the right thing to use. Other people's taste works like this: #try is simpler than #andand, and simpler is better. Others prefer andand's more natural syntax regardless.
For example, I prefer #andand's syntax for methods with parameters:
User.first.andand.max_attempts = 5
Phone.first.andand.dial(last_number)
#andand handles methods with blocks:
Supervisor.first.andand.oversee do
...
End
foo.andand.into { ... } is a common pattern, so #andand bakes it in:
Student.where( ... ).first.andand { |valedictorian| ... }
For some strange reason, I feel like I've been using it longer than anybody alive on the planet.