Hi,
This is a ruby constant resolution behavior — if the constant can’t be resolved at any level, it will call const_missing with the most-specific possible constant name. Two possible fixes:
* Make sure that your `Thing` class is loaded before your representer. E.g., `require` the file that contains it from your representer. Or,
* Qualify the Thing constant with “::” like “::Thing”. That tells ruby to use only the Thing constant that’s defined at the top level. If there isn’t one, const_missing will be called for just “Thing” instead of “A::B::Thing”.
(I’m assuming this is in a Rails app — ActiveSupport’s autoloading behavior relies on const_missing, which is why the value that gets passed to const_missing is important.)
Rhett
> --
> You received this message because you are subscribed to the Google Groups "Roar" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
roar-talk+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.