model 是 Rails 中的保留关键字吗?
有谁知道定义一个名为“model”的 Rails 模型是否会成为一个问题?
上一个问题中给出的链接似乎已损坏(http://wiki.rubyonrails.org/rails/pages/ReservedWords)
谢谢!
Does anyone know if defining a rails model called "model" can be an issue?
The link that was given in a previous question seems to be broken (http://wiki.rubyonrails.org/rails/pages/ReservedWords)
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了这些链接:
http://oldwiki.rubyonrails.org/rails/pages/ReservedWords
http://www.yup.com/articles/2007/01/31/no-reservations-about-keywords-in-ruby-on-rails
还有一些不是一样好,并且没有一个声明 Model 是关键字。
我也刚刚尝试了一下。我所做的就是制作一个脚手架,然后在网站上尝试操作,一切都很顺利。
I found these links:
http://oldwiki.rubyonrails.org/rails/pages/ReservedWords
http://www.yup.com/articles/2007/01/31/no-reservations-about-keywords-in-ruby-on-rails
And some others that weren't as good, and none of them state Model is a keyword.
I also just tried it out. All I did was make a scaffold and then tried out actions on the website, and everything went fine.