I would like to selectively reuse some data. I have two groups of
people who want very similar information about subject experts - but
they want slightly different fields and/or want to see the other
group's information but should not be able to edit it.
If I create the following models, don't the child models have access
to all the parent's attributes (unless I override the attribute
class Expert < ActiveRecord::Base
# has fields like name, email, title, expertise_according_to_group1,
class Group1_Expert < Expert
# If I did this, this model would have access to all fields in Expert,
right? Including the group2 fields
I could do what I want by just ignoring the group2 fields when showing
the expert to group1, but that feels kind of ummm unclean.
One can use database views to provide access controls on the
underlying table. I would like to do essentially the same thing in
Ruby/Rails, but I don't know how.