Properly support scoped models
Merge branch 'support_namespaced_resources'