A little background first, I was able to get the - Angular/Rails project working on local
I went to change the user/password in sqlite3 and here are the steps that I took
rails c
a = User.find(1)
a.name = "myName"
a.password_digest = "mySurName"
a.save
Great, it worked! NOT
Well, kind of, but the Angular app is looking for a password that looks something like this - $2a$10$TrTjNCWr5KlwW2h9aJr45u8MwLDo2ErEFQp1/ixc.8KW...
After doing some digging, I found a stackoverflow answer
Followed by me trying to do the following:
a = User.find(1)
filters = Rails.application.config.filter_parameters
f = ActionDispatch::Http::ParameterFilter.new filters
b = f.filter :password_digest => 'mySurName'
a.password_digest = b
Which results in an error that is in the subject line of this post - TypeError: can't cast Hash to string, followed by (0.1ms) rollback transaction and tons of lines of references to .rb files
So, my ultimate question is, how do I update a record that has a filter on a password field, while using rails console?
Thanks in advance