You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following case fails (assume that ApplicationRepresenter sets up the included modules for Roar and ApplicationController includes Roar::Rails::ControllerAdditions:
The following case fails (assume that
ApplicationRepresenter
sets up the included modules for Roar andApplicationController
includesRoar::Rails::ControllerAdditions
:The error is:
Uninitialized Constant Instruments::Instruments
. Seems like a better method of selecting a representer would be the following:Assume you have a controller namespaced as N1::N2::Controller and a representer namespaced as N1::ModelRepresenter:
Check for the following constants in order and if none is found then fail with
Uninitialized constant: N1::ModelRepresenter
N1::N2::N1::ModelRepresenter
N1::N1::ModelRepresenter
N1::ModelRepresenter
This way if the model is not namespaced it takes on the controllers namespace by default but can still find an un-namespaced representer.
The text was updated successfully, but these errors were encountered: