LOGIN

Archives: December 1999

I am quite sure someone has already found this simple solution, but when I poked around, I couldn't find it.

Here is my snippet to print out the error messages resulting from a validation as a flash notice:

  if @user.save 
    flash[:'notice'] = "New user saved successfully."  
  elsif !@user.errors.empty?
    flash[:'notice'] = "Could not save new user: " 
        << @user.errors.full_messages.join("; " ink 
  end
posted by erin at 06:43 PM in General tag in del.icio.us Digg!
tags: ruby / rails
 

So. I'm fiddling. again. with Ruby on Rails. because it's trendy.

I have to say, it's also handy. Very nice not to have to write the entire DB framework just to make an app! The problem that I have is I'm such a habitual programming dork that I find Ruby's syntax a little odd...

» Read More

posted by erin at 01:53 PM in General tag in del.icio.us Digg!
tags: ruby / rails