mercredi 26 octobre 2016

Show user.first_name devise Ruby on Rails?

I am quite new to Ruby on Rails. I am building a prototype of an application for a project of my but I have a error with devise.

I have created a migration so I users can fill in their first and last name. When a user is logged in I want to show "Hi, user.first_name". But I can't make it work.

This is the code I am using in the index.html.erb

I hope someone can help me with this issue,

Kind regards, Arend

PS this is the migration file:

add_column :users, :first_name, :string
add_column :users, :last_name, :string
add_column :users, :company_name, :string

Aucun commentaire:

Enregistrer un commentaire