monkey nonsense

babble babble babble

monkey nonsense header image 2

ruby on rails > me

February 23rd, 2008 · No Comments

ruby on rails is smarter than me.

so for the past few weeks, i’ve been messing around with ruby on rails. just playing around. and i created a model called “person” to keep track of users.

so i called the ruby command “ruby script/generate model person” expecting everything to be created named person. so “app/models/person.rb”, “db/migrate/001_create_person.rb”, etc. etc.

but i kept getting myself confused. some times it was people… some times it was person. because i was playing around so much, i kept getting mad at myself for being so wildly inconsistent with my naming convention! i even tried to do persons.

i just now noticed (because i started from scratch again since i broke my last attempt)… that ruby on rails, when i create the model person… is smart enough to rename things people when it needs it pluralized! genius.

too bad i didn’t notice this earlier.

Tags: Nerdy Stuff

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment