That generates a “constant already defined” error. I suspect it has to
be complaining about the |MyClass| part, but I can’t think of what else
to do there.
The problem is you used MyClass as constant instead of variable. Just
using the lowercase letter will solve ur problem.
Duh, that makes sense. I was stuck on needing to pass the class name in,
which even if that were the case, this isn’t how to do it anyway. Brain
spasm.
Thx.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.