Update users_controller.rb

create method in rails for users controller