Rails中保留字的列表* 3 * [英] List of reserved words in rails *3*

查看:70
本文介绍了Rails中保留字的列表* 3 *的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有针对RAILS-3的完整,权威的保留词列表?

Is there a good, authoritative list of reserved words for RAILS-3?

候选人:

  • http://oldwiki.rubyonrails.org/rails/pages/ReservedWords, but it seems a bit out of date and rails2.
  • http://cheat.errtheblog.com/s/rails_reserved_words (but there seems no authority to this - it could just grow and grow...)
  • http://latheesh.com/2010/02/02/rails-reserved-words/

背景:我维护着一个长期使用的Rails应用程序,它具有很多保留字的用法(判断 http ://oldwiki.rubyonrails.org/rails/pages/ReservedWords 似乎适用于rails2).但是,这些方法实际上都不会干扰当前的活动(该应用程序可以正常工作……我正在慢慢将其添加到所有通行证中的规范和功能).但是随着时间的流逝,我想删除那些保留字的用法,但是不想打扰一些保留字是否真的不再保留了.因此,虽然较长的列表可能对NEW Rails应用程序有利,但我需要比在某个时候在网页上列出它"更合理的预算支出理由...)

Background: I'm maintaining a long-serving rails app and it has plenty of usages of reserved words (judging that http://oldwiki.rubyonrails.org/rails/pages/ReservedWords seems to apply to rails2). However, none of these are actually interfering with current activity (the app works... and the specs&features I'm slowly adding to all pass). But as time passes I'd like to remove those usages of reserved words, but don't want to bother if some reserved words are no longer really reserved. So while a longer list might be good for NEW rails apps, I need stronger justification for budget spend than "it has been listed on a webpage at somepoint"...)

也许rails的本质是您找不到权威列表,但是您可以找到某些时候对我不起作用的东西"....

Maybe the nature of rails is that you can't find an authoritative list, but you can find "things that didn't work for me at some point"....

推荐答案

This seems like a pretty comprehensive list. However, you are correct. The very nature of programming means that this list will be ever changing. However I will do some research...maybe there is a site that can list reserved words based on the version of Rails you are using. If not...maybe someone should get working on it :D

这篇关于Rails中保留字的列表* 3 *的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆