For example:
<<table users>>
user_id
firstname
lastname
<<table auth_info>>
user_id <<PK>><<FK>>
username,
password
In my domain I wish to have User model with username,password properties
without create class model related to auth_info table and relative
association. Is there a way to do this with ActiveRecord ?
--
Posted via http://www.ruby-forum.com/.
I would redefine the method_missing feature (Ruby) in the model User.
Something like
class User
def method_missing(sym, *args, &block)
if (user_auth_info and user_auth_info.respond_to? name) then
return auth_info.send(sym, *args, &block)
else
super
end
end
end
This is NOT TESTED.
--
Nicolas Sebrecht