0

What is the difference between -> and lambda? Example:

scope :test, lambda {where(:name => "test")}

versus

scope :test, -> {where(:name => "test")}
sawa
  • 165,429
  • 45
  • 277
  • 381
  • 2
    http://stackoverflow.com/questions/28215047/difference-between-lambda-and-operator-in-ruby – joshua.paling Jul 31 '16 at 11:22
  • So it seems the second one is better. –  Jul 31 '16 at 11:25
  • Could you please put the question @joshua.paling has addressed to as the question that my question is duplicate of, I guess its more like my question... –  Jul 31 '16 at 11:27

0 Answers0