On Jul 22, 9:00 am, bones
<boese...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
wrote:> Let''s say I have this table:
>
>
> I understand that I can use before_insert and before_update to force a
> person_type to be ''staff'' or
''customer''. But is there also any way to
> add a condition (person_type=''staff'') on all the other
methods
> especially those who will use SQL SELECT, like find...
Sounds like you reinventing STI (single table inheritance)
Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---