开发者

How do I override MyModel.new(attributes) in rails?

Merged with How to override "new" method for a rails model. 开发者_JAVA技巧

In a normal rails app, if I have a model named MyModel an instance of it can be created via

MyModel.new(attributes)

If MyModel inherits from ActiveRecord::Base, how can I override the "new" method?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜