ruby on rails - Manage module trees with ActiveSupport -
i have rails project myapp fragmented multiple gems. 1 of them manage users.
considering want code reloading , auto-require activesupport, along namespaced folders require files. can organize code way:
# myapp::users ./lib/my_app/users ./app/controllers/my_app/users/ ./rspec/unit/my_app/users/
the above way clean one, results on long nested routes repeated pattern my_app/users/
, can exhausting lazy programmers. since still need folder namespace differentiate code different gems, thought abusing root namespace:
# users ./lib/users ./app/controllers/users/ ./rspec/unit/users/
that not clean , more fragment gems, higher chances have namespace collision.
which organization pattern commonly used? rails way?
for library first 1 seems best one, large application feels tiring having time long paths , maybe fear name collision doing more harm good.
Comments
Post a Comment