Forum: Ruby on Rails how to make a private attributes in STI?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ffd881829651935d986c52d12279befb?d=identicon&s=25 Zhenning Guan (rubyernewbie)
on 2008-10-25 17:50
people table like this

id int not null auto_increment,
type varchar not null
/* common attributes */

name varchar not null,
email  varchar not null,
/* attributes for type=Customer */

balance decimal(10,2),
/* attributes for type=Employee */

=================
model
-
class person < activerecord::Base
end

class Customer < Person
end

class Employee < Person
end

============
this is a segnment on 'agile web development with rails'



my silly question is though the autoer note which attribute belong who,
but in the real world, real code, how can I know which is private
attribute for customer or employee?
Ffd881829651935d986c52d12279befb?d=identicon&s=25 Zhenning Guan (rubyernewbie)
on 2008-10-26 03:42
> my silly question is though the autoer note which attribute belong who,
> but in the real world, real code, how can I know which is private
> attribute for customer or employee?


any thought here?
This topic is locked and can not be replied to.