Giving any user a direct link to edit another user's account settings doesn't seem like a great idea. Instead we'll generate a random secure hash string to help keep things more secure. We'll store these hashes on each user so that we have a way to find them during this public query. To do this we need to add a column to the user table.
6 lines
142 B
Ruby
6 lines
142 B
Ruby
class AddSubscriptionsTokenToUsers < ActiveRecord::Migration[5.2]
|
|
def change
|
|
add_column :users, :subscriptions_token, :string
|
|
end
|
|
end
|