Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect namespace #423

Open
artur-intech opened this issue Mar 17, 2017 · 2 comments
Open

Incorrect namespace #423

artur-intech opened this issue Mar 17, 2017 · 2 comments

Comments

@artur-intech
Copy link
Contributor

artur-intech commented Mar 17, 2017

Using Registrar as a namespace for registrar area classes (for example Registrar::DeppController) is incorrect since it introduces constants under Registrar model class.

Same may apply to other areas.

Consider renaming registrar and registrant area namespaces to:

  • Distributor and Consumer
  • RegistrarArea and RegistrantArea

Other things to consider:

  • Route helpers length (should not be cumbersome to type)
@artur-intech
Copy link
Contributor Author

artur-intech commented Apr 6, 2017

This becomes a real problem for further development.

Now this issue prevents refactoring registrar area controller hierarchy to use BaseController approach:

module Registrar
  class BaseController < AdminController

  end
end

The code above will not work because app/models/registrar.rb defines:
class Registrar < ActiveRecord::Base.

Under some circumstances, defining class Registrar again will lead to exception, since the original class is derived from ActiveRecord::Base, whereas a new one is not.

@artur-intech
Copy link
Contributor Author

artur-intech commented Jan 17, 2018

registrar_contact_path is misleading. One can think (and I actually did before I realised an issue) of it as a contact of a registrar, whereas actually it points to a contact (registrant) in registrar area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant