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
accessors individually)?

class Expert < ActiveRecord::Base
# has fields like name, email, title, expertise_according_to_group1,
expertise_according_to_group2
end

class Group1_Expert < Expert
# If I did this, this model would have access to all fields in Expert,
right? Including the group2 fields
end

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.


--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to