When to use a lambda in Ruby on Rails?

http://augustl.com/blog/2008/procs_blocks_and_anonymous_functions/ has a run-down of what blocks/procs/lambdas are, how you can use them, and how they compare to functions in other languages. It definitely answers your question.

Do be aware that the last section ‘A note on lambdas’ mentions a point that is only true in Ruby 1.8 and changed in 1.9 – Ruby: Proc.new { ‘waffles’ } vs. proc { ‘waffles’ }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)