mirror of
https://github.com/mastodon/mastodon.git
synced 2026-08-11 11:57:07 -05:00
fix naming
This commit is contained in:
@@ -39,7 +39,7 @@ module Admin
|
||||
def log_action_from_change
|
||||
action_log = current_account.action_logs.new(action: 'update', target: @tag)
|
||||
|
||||
action_log.log_changes = @tag.saved_changes.slice('usable', 'trendable', 'listable').transform_values(&:last)
|
||||
action_log.recorded_changes = @tag.saved_changes.slice('usable', 'trendable', 'listable').transform_values(&:last)
|
||||
action_log.save
|
||||
end
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class Admin::ActionLog < ApplicationRecord
|
||||
before_validation :set_route_param
|
||||
before_validation :set_permalink
|
||||
|
||||
store_accessor :log_changes, *LOG_ATTRIBUTES
|
||||
store_accessor :recorded_changes, *LOG_ATTRIBUTES
|
||||
|
||||
scope :latest, -> { order(id: :desc) }
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ RSpec.describe 'Admin Tags' do
|
||||
expect(response).to have_http_status(302)
|
||||
expect(Admin::ActionLog.last.human_identifier).to eq('#supertag')
|
||||
expect(Admin::ActionLog.pluck(:action)).to eq(%w(update))
|
||||
expect(Admin::ActionLog.pluck(:log_changes)).to eq([{ 'listable' => false, 'trendable' => true }])
|
||||
expect(Admin::ActionLog.pluck(:recorded_changes)).to eq([{ 'listable' => false, 'trendable' => true }])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user