Ruby on Rails - what is make method on a model?

邮差的信 提交于 2019-12-13 01:53:46

问题


In my lib/tasks/data.rake, I have User.make(attributes). The make method appears to create a new record, but I cannot find any docs on this. The make method is not defined by my User model and fyi my User model inherits ActiveRecord::Base.


回答1:


I 'called a friend', it turned out to be https://github.com/notahat/machinist gem



来源:https://stackoverflow.com/questions/14451397/ruby-on-rails-what-is-make-method-on-a-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!