Ask A Question


You’re not receiving notifications from this thread.

Mapping API Resources & Handling Pagination Discussion

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 ...

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 73,723+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2023 GoRails, LLC. All rights reserved.