At Colin's suggestion, I have started a Wiki page with an old list of reserved words, and I'd appreciate any additions to it. If I get a moment, I'll put a simple app up on Heroku with the words in it so we can search and sort and whatnot. I can't believe this hasn't been kept up, since the number of *magic* words in the framework has surely grown since Cheat Sheets was current.
https://github.com/walterdavis/railsready/wiki
Thanks,
Walter
There is now an app on Heroku for this. Please chip in and add any words you know are "trouble".
http://reservedwords.herokuapp.com
Thanks,
Walter
Not sure if worth adding, but I hit some weeks ago a nice issue when
translating a site that contained "NO" translations in YAML, like
this:
https://gist.github.com/1707858
"NO" meant as in "Norway". I18n.t('country.NO') was returning
"translation missing: en.country.NO".
So, "YES" and "NO" are reserved words at this level. The fix was to
add quotes like this:
country:
"NO": "Norway"
Best regards,
Rafael Fernández López.
Thanks.
-
A bug report … when clicking on the detail (show view)
of 1 word, the authentication is also required. Should
only be required on new/create and edit/update
(but not on show).
-
what about capitalization?
I added “true” because only “TRUE” was in the list. But
I see from the URL’s that “TRUE” is mapped to “true”
and the new “true” I added to “true-2”.
Making the separate entries case sensitive may be a
better approach (in a case sensitive design, “TRUE”
and “true” are very different strings).
HTH,
Peter
*** Available for a new project ***
Peter Vandenabeele
http://twitter.com/peter_v
http://rails.vandenabeele.com
http://coderwall.com/peter_v
There is now an app on Heroku for this. Please chip in and add any words you know are "trouble".
http://reservedwords.herokuapp.com
Thanks.
1) A bug report ... when clicking on the detail (show view)
of 1 word, the authentication is also required. Should
only be required on new/create and edit/update
(but not on show).
Thanks, that's a good call. Done.
2) what about capitalization?
I added "true" because only "TRUE" was in the list. But
I see from the URL's that "TRUE" is mapped to "true"
and the new "true" I added to "true-2".
The URLs are from FriendlyID, and the mapping of all slugs to lower-case and suffixing with numbers is its doing. I could just use numbers like any good Rails CRUD site would, that would make it fair.
Making the separate entries case sensitive may be a
better approach (in a case sensitive design, "TRUE"
and "true" are very different strings).
I didn't want to dig too deep into FriendlyID to fix this, if you have a patch that will do it, I'll gladly add it.
Thanks,
Walter