开发者

difference between self.up and up in rails migration

I have noticed that some tutorials use self.up and self.down for migration methods. I understand that the self keyword indicates the method belo开发者_StackOverflowngs to the instance only, but do they actually make a difference?


This is a change in Rails 3.1 - it used to have to be self.up and self.down, but now there has been a restructuring to allow them to just be up or down, and the associated method "change".

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜