Open wojtha opened 8 years ago
Hey, thanks! What's the content of comment/representer.rb
?
The code from master branch is here: https://github.com/apotonick/gemgem-trbrb/blob/master/app/concepts/api/v1/thing/representer.rb#L21
I got same error in chapter-11 branches. Chapters 03-10 seems to be ok, tried almost all of them (to be explicit I test these: chapter-03, chapter-05, chapter-06, chapter-07, chapter-09, chapter-10.)
Branches master
, chapter-11
and chapter-11-plural-directories
gave me this error as well.
seems to be namespacing issue, when fully qualifying the representer the issue seems to be fixed :
diff --git a/app/concepts/api/v1/thing/representer.rb b/app/concepts/api/v1/thing/representer.rb index 27d2801..6c72090 100644 --- a/app/concepts/api/v1/thing/representer.rb +++ b/app/concepts/api/v1/thing/representer.rb @@ -18,7 +18,7 @@ module API::V1 feature Roar::JSON::HAL with_comments = Class.new(Create) do - collection :comments, decorator: Comment::Representer::Show, embedded: true + collection :comments, decorator: API::V1::Comment::Representer::Show, embedded: true end collection :to_a, as: :things, embedded: true, decorator: with_comments
@apotonick Some offtopic at the beginning. Thanks for this framework! I can't wait to use it in production at https://inlinemanual.com. Maybe tweak the Operation bit (I am now bit influenced by Hanami::Interactor), but all the concepts are really nice. I am even thinking about rewriting our serializers from AMS to Roar, but lets see how it goes :)
Now back to the business... :beer: I am just in the middle of the book in the cells chapter and I finally got the feeling, okay lets see how it works in reality and installed this demo app. Unfortunately I got the following error:
Full stacktrace is here: