ruby on rails - Simple Form - filtering updated attributes in the log -


simple question simple form:

i've attribute in user model token i'd marked [filtered] when passed on network (as password field default).

e.g.

i have:

parameters: { "token"=>"wyxe3z24jmuq", "email"=>"test@testing.com",  "password"=>"[filtered]"}} 

i want:

parameters: { "token"=>"[filtered]", "email"=>"test@testing.com",  "password"=>"[filtered]"}} 

and example form:

<%= simple_form_for @user |f| %>   <%= f.input :token %>   <%= f.input :email %>   <%= f.input :password %>   <%= f.input :password_confirmation %>   <%= f.button :submit %> <% end %> 

what option need add field achieve this? i'm there's option, can't seem find anywhere.

thanks in advance!

steve.

in application.rb following:

config.filter_parameters += [:password, :token] 

check answer: how filter parameters in rails?


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -