mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 19:38:24 +00:00
b1495884eb
Why this change? When creating a new theme setting that does not have a corresponding row in the `theme_settings` table, we end up writing to the database twice because `ActiveRecord::Base#save!` is called once before the `value` or `json_value` column is updated again with another database query with another call to `ActiveRecord::Base#save!`. What does this change do? Adds the column to be updated to argument for the `ActiveRecord::Base#create!` method call so that we only have one write query to the database.