Rails naming gotcha
George Malamidis, May 29th, 2006A quick one in hope that it might save some people a minor headache… I just found out that you can’t use the word URL as a Model name in Rails, otherwise you’ll get a
undefined method `rewrite' for #<Url:0xb7675e64>
error.
Digg some Convention over Configuration

May 30th, 2006 at 3:29 am
Apparently you can’t use “Class” as a class in Java either. Sheesh, now how am I gonna model my university app?? Lame lexers.
Recommend something like “address” as attribute name rather than “URL” anyway (plus they’ll be IRIs anytime soon).
May 30th, 2006 at 5:04 am
Yep, same as ‘private’, ‘public’, etc. With the slight difference that these are keywords at the language as oposed to framework level.