我的用户写了他们的名字和姓氏,没有大写
有没有办法覆盖模型的 getterfirstname
和lastname
属性以User
使其返回firstname.capitalize
?
如果我做
def firstname
self.firstname.capitalize
end
我明白了stack too deep error
我的用户写了他们的名字和姓氏,没有大写
有没有办法覆盖模型的 getterfirstname
和lastname
属性以User
使其返回firstname.capitalize
?
如果我做
def firstname
self.firstname.capitalize
end
我明白了stack too deep error