标签: ruby-on-rails ruby
有没有办法在初始化对象时覆盖activeresource上的属性setter?
答案 0 :(得分:1)
您可以尝试覆盖加载方法
def load(attributes, remove_root = false) super(attributes, remove_root) #put your code, here you have @attributes collection self end