Currently maintaining some old Ruby server and got the following error in Log:
NoMethodError (undefined method `find_all_by_X_ID' for #<Class:0x00000005555555>):
app/controllers/some_controller.rb:10:in `buggy_function'
When viewed the faulty line in code of the buggy function is looks like this:
Hash[S.find_all_by_X_ID(TaskRun.select(:x_id).uniq.where(y_id: @y.Y_ID).map(&:x_id)).map { |s| [s.S_IDENTIFIER, s.X_ID] }]
To be frank, I'm new to Ruby, and wondering how implementing this find_all_by_X
query would be the best, and why it appears as it should be automatic (as it has to do with the model component).
We're working on Ruby version 2.