How do I override MyModel.new(attributes) in rails?
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?
精彩评论