Skip to content

Commit

Permalink
Merge pull request #139 from southbridgeio/fix-no-method-error-for-te…
Browse files Browse the repository at this point in the history
…xt-class

fix no method error for text class
  • Loading branch information
nevrfl authored Nov 27, 2024
2 parents a0c8065 + ea15e0f commit 3d74bc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.6.2

* Fix no method error for text class

# 1.6.1

* Change foreign key to issue
Expand Down
4 changes: 4 additions & 0 deletions lib/intouch/preview/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Intouch::Preview
class Text
include ApplicationHelper
include ActionView::Helpers::SanitizeHelper
include ERB::Util
include ActionView::Helpers::UrlHelper
include Rails.application.routes.url_helpers

def self.normalize(issue, journal)
new(journal&.notes.presence || issue&.description.presence || issue&.subject.presence || '').normalized
Expand All @@ -18,6 +21,7 @@ def normalized
private

attr_reader :raw_text
attr_reader :controller

def sanitizer
Rails::Html::FullSanitizer.new
Expand Down

0 comments on commit 3d74bc6

Please sign in to comment.