File tree Expand file tree Collapse file tree 4 files changed +25
-0
lines changed
Expand file tree Collapse file tree 4 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ gem "stimulus-rails"
2626
2727gem 'tailwindcss-rails'
2828
29+ gem 'active_decorator'
30+
2931# Use Redis adapter to run Action Cable in production
3032# gem "redis", ">= 4.0.1"
3133
Original file line number Diff line number Diff line change 4444 erubi (~> 1.11 )
4545 rails-dom-testing (~> 2.2 )
4646 rails-html-sanitizer (~> 1.6 )
47+ active_decorator (1.5.1 )
48+ activesupport
4749 activejob (8.0.3 )
4850 activesupport (= 8.0.3 )
4951 globalid (>= 0.3.6 )
@@ -347,6 +349,7 @@ PLATFORMS
347349 x86_64-linux-musl
348350
349351DEPENDENCIES
352+ active_decorator
350353 aws-sdk-s3 (~> 1 )
351354 bootsnap
352355 brakeman
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ module MessageDecorator
4+ def from
5+ super &.gsub ( /@[a-zA-Z.\- ]+/ , '@...' )
6+ end
7+ end
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ require 'test_helper'
4+
5+ class MessageDecoratorTest < ActiveSupport ::TestCase
6+ def setup
7+ @message = Message . new . extend MessageDecorator
8+ end
9+
10+ # test "the truth" do
11+ # assert true
12+ # end
13+ end
You can’t perform that action at this time.
0 commit comments