Closed palkan closed 6 years ago
Does with_model :"A::B"
not work?
Actually…it won’t. But for the same reason this P.R. won’t if the namespace isn’t already defined. (I think…it’s early—I’ll look into this further later.)
This has been implemented in aa788c02615e29cddd73d4286625cfdcda768a3d. Will make a release sometime soon. I’ve implemented this a bit differently than your P.R.; instead, just provide the namespace in the name (e.g. with_model :'Foo::Bar'
). The namespace does still need to already exist (with_model will not create it, as that feels, to me, overreaching). I think this API is perhaps a bit more intuitive than a separate option.
Sorry it took so long to get this feature in!
@palkan This is now in v2.1.0.
Make possible creation of namespaced models: