我有两个模型User
和Google::User
。 Rails有时会理解两者之间的差异,但会混淆两种模型。这是我在rails console中的输出。我从User
模型输出的时间。
irb(main):004:0> User
=> User(id: integer, email: string, encrypted_password: string, reset_password_token: string, reset_password_sent_at: datetime, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: inet, last_sign_in_ip: inet, name: string, location: string, website: string, github: string, created_at: datetime, updated_at: datetime)
irb(main):005:0> Google::User
=> Google::User(id: integer, email: string, encrypted_password: string, reset_password_token: string, reset_password_sent_at: datetime, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: inet, last_sign_in_ip: inet, name: string, location: string, website: string, github: string, created_at: datetime, updated_at: datetime)
我知道两者都是完全命名空间的。那么为什么会这样呢?