Last active
April 18, 2017 07:43
-
-
Save anbublacky/a6e66217b2fcdeb52fe580864beecf7f to your computer and use it in GitHub Desktop.
Uninitialized constant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/api/proj/api/v2/entities/committee_base.rb | |
module PROJ::API::V2::Entities | |
class CommitteeBase < Grape::Entity; | |
expose :id | |
end | |
class CommitteeOffice < CommitteeBase; | |
expose :name | |
end | |
end | |
present @committees, with: PROJ::API::V2::Entities::CommitteeOffice | |
Error: | |
uninitialized constant PROJ::API::V2::Entities::CommitteeOffice | |
If i use | |
present @committees, with: PROJ::API::V2::Entities::CommitteeBase | |
its working | |
Even i have the autoload paths app/api/* in application.rb | |
If i make CommitteOffice into a seperate file its working. but i dont want it in a seperate file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment