ga-wdi-exercises / project2

[project]
1 stars 30 forks source link

Added a key to the devise user table but it doesn't show up on browser #891

Closed tarkzc closed 7 years ago

tarkzc commented 7 years ago
screen shot 2017-06-14 at 11 18 55 am

I added :firstname key to the devise user table.

screen shot 2017-06-14 at 11 19 11 am

I want username's :firstname to be shown every page. User's email is showing up but firstname doesn't show up.

screen shot 2017-06-14 at 11 19 35 am
amaseda commented 7 years ago

Did you re-run your migrations after updating the migration? What happens if you run rails db:migrate:reset? Youl'll probably need to turn off/on your Rails server.

tarkzc commented 7 years ago

Yes I did, it doesn't work

amaseda commented 7 years ago

Ah, I think it's because you're not actually using that configure_permitted_parameters method you defined. You need to actually call it before the relevant controller actions. Take a look at this example in the Devise documentation, paying particular attention to what is included at the top of the ApplicationController.

https://github.com/plataformatec/devise#configuring-models

tarkzc commented 7 years ago

Got it. Thanks Adrian.

amaseda commented 7 years ago

Nice. Close this one when you've solved the issue / if you run into any other problems relating to this issue post them here!