Call for help: Rails Reserved Words Wiki

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.

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 Fernndez Lpez.

On Thu, Feb 9, 2012 at 7:09 AM, Walter Lee D. [email protected]
wrote:

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

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

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 V.
http://twitter.com/peter_v
http://rails.vandenabeele.com
http://coderwall.com/peter_v

On Feb 9, 2012, at 3:37 AM, Peter V. wrote:

only be required on new/create and edit/update
(but not on show).

Thanks, that’s a good call. Done.

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs