This project is archived and is in readonly mode.
Allow optional arguments and/or block for Object#try
-
Luciano G. Panaro
Based on Eloy's patch I added the option of using a dynamic try_* method instead of calling try directly.
So you would do @person.try_name (instead of @person.try(:name), even though you can still do that too).
Any thoughts?
-
Michael Siebert
+1 for for the original patch
-
Levin Alexander
+1 for original patch
-
Repository
- State changed from new to resolved
(from [823b623fe2de8846c37aa13250010809ac940b57]) Allow optional arguments and/or block for Object#try like Object#send does. [#1425 Allow optional arguments and/or block for Object#try state:resolved]
Original suggestion by Pat Nakajima.
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
-
Michael Siebert
great! thank you!
