On Dec 6, 2009, at 3:31 PM, Jorge Gastaldi wrote:

> I'm starting with hobo and I'm developing a simple application for
> management of a small medical office where several doctors work. They
> share a secretary and she's the system main user. She doesn't want to
> mix the different doctors data, so I want her to have a drop down on
> top of every page to select the doctor she is working with. On the DB,
> this means to have a Doctor Id on almost every table and every query
> will be constrained by that field; just like when you a have a system
> that will be shared by several companies.
>
> My question is how to implement this "the hobo way". I mean, is there
> some hobo "magic" that will help me to apply the _almost_ omnipresent
> doctor id from the drop down to _almost_ every query in the
> application.
>

The closest thing to what you're looking at is probably the subdomain- 
per-account technique. It's not directly applicable (you're likely not  
generating subdomains for doctors) but the concept of having model  
data scoped by an association is similar.

Good tutorial:
http://robbyonrails.com/articles/2009/01/11/subdomain-accounts-with-ruby-on-rails-explained

--Matt Jones


--

You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.


Reply via email to