Explore
Topics
Recent Comments
- These code examples would certainly benefit from some TLC applied. Like formatting and getting...
Evgeniy Dolzhenko
- I had checked, and tested a lot of time. It work well and flexible on IE, FF, and Chrome *But, in Chrome...
Phong Tran
- hi! i am working with cascades and i would like to use a hands detector and apply a kalman filter to follow...
rachel
- These code examples would certainly benefit from some TLC applied. Like formatting and getting...
Related Posts
No related posts.
Ruby on Rails DevOne of the largest dedicated RoR development team around can help you build just about anything you can imagine.
If in doubt, try try again
If in doubt, try try agin
On some recent projects I have seen the following code similar to:
User.find_by_login("noone").id rescue nil
So I just wanted to remind people of the try method.
User.find_by_login("noone").try(:id)
Personally I think try communicates the intent of the code.