title: Single Table Inheritance Ruby on Rails
body: <p>So within rails, using active record, we can have multiple models that inherit user</p>
  
  <p>Base Class - User
  Sub-Class - Employee, Manager, Supervisor</p>
  
  <p>So in rails we use only one table though when you create a new Employee and when you try to access Employee.salary, though only managers and supervisors should have access to those attributes. How do you protect those? Attr methods? </p>
  
  <p>Thanks in Advance.</p>