Mapping API Resources & Handling Pagination Discussion
Discussion for
Mapping API Resources & Handling Pagination
Looks like the code in this episode has evolved over time, I'm watching it (paid my subscription too) in 2022, post pandemic, and the source code is quite different now at GitHub, where can I find the logic behind the code evolution? Thanks, great content, definitely worth the subscription
Looks like there is nobody here anymore, but I'm going to post this request for help anyway... I'm getting this error from ostruct and don't know how to solve it (NoMethodError)
hash.each_pair do |k, v|
^^^^^^^^^^
from /Users/lflores/.asdf/installs/ruby/3.1.0/lib/ruby/3.1.0/ostruct.rb:128:in `initialize'
from /Users/lflores/Laboratory/RailsLab/pli_third_parties_api_wrapper/lib/pli_third_parties_api_wrapper/object.rb:6:in `initialize'
from /Users/lflores/Laboratory/RailsLab/pli_third_parties_api_wrapper/lib/pli_third_parties_api_wrapper/resources/users.rb:6:in `new'
from /Users/lflores/Laboratory/RailsLab/pli_third_parties_api_wrapper/lib/pli_third_parties_api_wrapper/resources/users.rb:6:in `show'
from (irb):3:in `<main>'
from bin/console:22:in `<main>'
I will try using 'respond_to(:each_pair) to cut the recursivity call to 'to_ostruct(val)'... whish me luck ...