Karla Lara

Joined

40 Experience
0 Lessons Completed
0 Questions Solved

Activity

Great question! For configs set at boot time, one approach is to use environment variables and restart the Rails app between tests with different values. For automated testing, consider wrapping config-dependent logic in a class or method that reads from Rails.configuration or ENV, so you can stub or mock it in tests. You can also use with_env or similar helpers in RSpec to temporarily override ENV values. Let me know more about your setup—happy to help further!

Deltarune

It looks like the issue might be that counter_culture updates aren't triggering correctly with Stimulus-driven actions. Make sure you're calling the correct model methods that trigger the counter update, and check if the after_commit callbacks are firing. Also, try running the CounterCulture::Counter.reset_all to manually fix counts and see if it's a sync issue. Let me know more about your Stimulus setup—happy to help dig deeper!
Deltarune

Learn Hotwire uses a separate login from GoRails. Try the “Forgot your password?” on their site to reset your account. If that doesn’t work, contact their support for help. GoRails credentials won’t work there.

You can include Enumerable in your class, but you’ll need to define an each method (yielding your elements). Then you’ll get all the Enumerable methods like map, select, etc., for free. For example:
class MyCollection
include Enumerable

def initialize(items)
@items = items
end

def each(&block)
@items.each(&block)
end
end
With that in place, MyCollection.new([1,2,3]).map { |i| i * 2 } works perfectly. Hope that helps!