mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 13:05:17 +08:00
30990006a9
This reduces chances of errors where consumers of strings mutate inputs and reduces memory usage of the app. Test suite passes now, but there may be some stuff left, so we will run a few sites on a branch prior to merging
18 lines
618 B
Ruby
18 lines
618 B
Ruby
# frozen_string_literal: true
|
|
|
|
# avatar_url does not function properly as it does not properly deal with scaling.
|
|
# css based scaling is inefficient and has terrible results in both firefox and ie. canvas based scaling is slow.
|
|
#
|
|
# for local urls we need to upload an image and have a pointer to the upload, then use the upload id in the user table
|
|
# for gravatar we already have the email and can hash it
|
|
|
|
class DropAvatarUrlFromUsers < ActiveRecord::Migration[4.2]
|
|
def up
|
|
remove_column :users, :avatar_url
|
|
end
|
|
|
|
def down
|
|
add_column :users, :avatar_url, :string, null: false, default: ''
|
|
end
|
|
end
|