24 Apr 2010, 20:30
Generic-user-small

Lee McAlilly (3 posts)

Hi, I can’t seem to get the #{@user.name} that was added to depot_p/app/controllers/users_controller.rb to work.

Everything else works just fine I can add new users, but when I add a new user instead of saying “User John Doe was successfully created”, it says “User #{@user.name} was successfully created.”

I can’t figure out why this is happening.

24 Apr 2010, 21:04
Generic-user-small

Lee McAlilly (3 posts)

Ok, I figured this out. Flash notices must be in double quotes, not single quotes. I had flash[:notice] = ‘User #{@user.name} was successfully created.’ when it should have been flash[:notice] = “User #{@user.name} was successfully created.”

  You must be logged in to comment