NoobOnRails

Ruby on Rails tips, tricks and hints for the aspiring rails hero.



Saturday, December 17, 2005

A quick tidbit on working in a view


If you're working in a view and you wondering why your...

<% for person in @people %>

<% person.name %>

<% end %>

...isn't showing the name of that person as stored in your database (you may not get an error), it's not because the app isn't working right. You're just not telling it to convert the raw data it's getting from the db. You need to modify the

<% person.name %>

line to look like this

<%= person.name %>

The = sign tells Rails to turn that value into a string. If the data is a string, it will be displayed on your page. Voila!

Tuesday, December 13, 2005

Ruby on Rails hits 1.0 milestone


Rails trumpets it's 1.0 release with a snazzy new website that houses more and better organized content. There aren't any new earth moving features but hey, it's 1.0. You should be happy with that! More details on the Ruby on Rails blog.