dobtco / procure-io

*NOT CURRENTLY MAINTAINED* Procurement software for the 21st century.
Other
40 stars 16 forks source link

new_organization_path error in views #199

Open daguar opened 11 years ago

daguar commented 11 years ago

A number of views (incl shared/_user_sidebar and vendor/_form) reference new_organization_path, but this route is not defined in routes.rb (the organization resource excludes index, new, and create) and so the views blow up (unknown local var or method).

I'm guessing this is the result of multi-tenancy changes. I don't know the underlying data model being represented here (organization vs. city vs. vendor etc) and what it should look like in the Community version, so am simply adding a bug report.

I would have submitted a feature spec, but am traveling today and only doing this on phone.

ajb commented 11 years ago

You're correct in your assumptions. If it'll help, I can map out the data model a bit for you.

The short version:

daguar commented 11 years ago

But is an organization something that would not exist in a multi-tenant context? i.e., is organization in this context a city/agency, and therefore wouldn't be necessary in a single-tenant context?

(Sorry if this is obvious-sounding, but much faster to ask you this top-level question than spend a bunch of time inferring from code and maybe being wrong.)

ajb commented 11 years ago

Correct, I think that the organization wouldn't exist in a single-tenant context. I wouldn't advocate for removing it (because then we might need a GlobalConfig singleton like we used to have), but maybe for making it a singleton just to avoid any confusion.

I've had good luck with https://github.com/stephencelis/acts_as_singleton.