Search

Enter a search word or two and press return to see the search results.

Who am I?

Hi, I’m Graeme and these are my notes, from my messy desk. I started this blog because Google proved to be more useful at finding content than anything else I’ve used.

So I started adding my own content in the hopes that Google would index it and allow me to find things again in the future.

It works.

You can find out more about me here, and you should follow me on Twitter here.

Keeping up

You can automatically receive new content here by subscribing to the “Blog RSS” (link below). This is the easiest way to keep up with what I write here.  See this BBC article for a good introduction on RSS and keeping up with the goings on of the Internet more easily.

« Ruby on Rails hosting | Main | Rails 1.1 out! »
Tuesday
28Mar2006

Note to self

Note to self: calling your shiny new model 'action' in Rails, no matter how well it maps to the problem domain, isn't really that great an idea. The word might even sound familiar, eh? You're only really going to notice the problem when it comes to form submission though (or possibly other interaction with the controller).

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (2)

Wouldn't it be sweet if rails would include a reserved word list? Even sweeter if it used that word list when running script/generate so that you couldn't name things great names that match your problem domain but can't be used?

March 28, 2006 | Unregistered CommenterForrest

Weird, I came across exactly the same problem last week, was fine until I went to call params[:action], took at least an hour to figure out what was wrong. Should have twigged sooner realy. I agree with Forrest, some kind of safeguard for this would be good.

March 29, 2006 | Unregistered CommenterJamie Hill

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>