Forum: Ruby on Rails Call for help: Rails Reserved Words Wiki

A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2012-02-08 18:52
(Received via mailing list)
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
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2012-02-09 07:10
(Received via mailing list)
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
534e2dda3d203916cded6d257111d217?d=identicon&s=25 "Rafael Fernández López" <ereslibre@gmail.com> (Guest)
on 2012-02-09 07:50
(Received via mailing list)
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.
160992dfd434ff7055465446b9423bd5?d=identicon&s=25 Peter Vandenabeele (petervandenabeele)
on 2012-02-09 09:38
(Received via mailing list)
On Thu, Feb 9, 2012 at 7:09 AM, Walter Lee Davis <waltd@wdstudio.com>
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 Vandenabeele
http://twitter.com/peter_v
http://rails.vandenabeele.com
http://coderwall.com/peter_v
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2012-02-09 15:22
(Received via mailing list)
On Feb 9, 2012, at 3:37 AM, Peter Vandenabeele wrote:

> 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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.