Skip to content

Commit 60ac117

Browse files
iHiDclaude
andauthored
Remove max-width from .c-perk logo (#9019)
* Remove max-width from .c-perk logo Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Remove admin guard from advert click logging Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 66d35f7 commit 60ac117

3 files changed

Lines changed: 1 addition & 19 deletions

File tree

app/commands/partner/log_advert_click.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,10 @@ class LogAdvertClick
77
initialize_with :advert, :user, :clicked_at, :impression_uuid
88

99
def call
10-
return unless valid_click?
11-
1210
Advert.where(id: advert.id).update_all('num_clicks = num_clicks + 1')
1311
end
1412

1513
private
16-
def valid_click?
17-
return false if user&.admin?
18-
19-
true
20-
end
21-
2214
def doc
2315
{
2416
advert_id: advert.id,

app/css/components/perk.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@apply flex flex-col items-stretch;
55

66
.logo {
7-
@apply h-[40px] max-w-[190px];
7+
@apply h-[40px];
88
@apply mb-12;
99
@apply self-start;
1010
}

test/commands/partner/log_advert_click_test.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,4 @@ class Partner::LogAdvertClickTest < ActiveSupport::TestCase
99

1010
assert_equal 1, advert.reload.num_clicks
1111
end
12-
13-
test "doesn't log for admin users" do
14-
advert = create :advert
15-
user = create :user, :admin
16-
assert_equal 0, advert.num_clicks
17-
18-
Partner::LogAdvertClick.(advert, user, nil, nil)
19-
20-
assert_equal 0, advert.reload.num_clicks
21-
end
2212
end

0 commit comments

Comments
 (0)