ruby-hyperloop / hyper-mesh

The project has moved to Hyperstack!! - Synchronization of active record models across multiple clients using Pusher, ActionCable, or Polling
https://hyperstack.org/
MIT License
22 stars 12 forks source link

Named parameters on scopes don't work #55

Open sfcgeorge opened 6 years ago

sfcgeorge commented 6 years ago

Named parameters on scopes don't seem to be supported by hyper-mesh, it complains about the number of arguments.

# works
scope(:mark_viewed_by, lambda do |user, recruitment|
end)

# errors
scope(:mark_viewed_by, lambda do |user, recruitment:|
end)

This is the error you get from execute_remote with the second option (named params):

HyperModel fetching records failed, exception caught when applying ["mark_viewed_by", 9, {"recruitment"=>10}] to db object #<Message::ActiveRecord_Relation:0x00007f970ff20fc8>: wrong number of arguments (given 2, expected 1)

catmando commented 6 years ago

yeah that is not surprising... I am not going to tag this for the 1.0 / 15 release. okay?