Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of reserved words in rails *3*

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

Candidates:

  • 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/

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"...)

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"....

like image 237
Tim Diggins Avatar asked Dec 03 '12 10:12

Tim Diggins


1 Answers

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

like image 93
Bill Garrison Avatar answered Oct 11 '22 00:10

Bill Garrison