makandra/assignable_values

Use proc instead of lambda

dirkholzapfel opened this issue · 0 comments

The example given in the readme does not work with Ruby 1.9.3. The readme is based on Ruby 1.8.7, isn't it? If so, a little note to use the proc syntax in 1.9.x would be nice:

assignable_values_for :state, :through => lambda { Power.current }
# wrong number of arguments (1 for 0)

assignable_values_for :state, :through => proc { Power.current }
# works fine

see: http://stackoverflow.com/questions/8320283/builder-throwing-wrong-number-of-arguments-error-when-passed-a-block-in-ruby-1

If you can confirm the problem, the authorize_values_for macro in Consul also needs an update.