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)
Named parameters on scopes don't seem to be supported by hyper-mesh, it complains about the number of arguments.
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)