diff options
Diffstat (limited to 'app/models/concerns/diff_positionable_note.rb')
-rw-r--r-- | app/models/concerns/diff_positionable_note.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/models/concerns/diff_positionable_note.rb b/app/models/concerns/diff_positionable_note.rb index b61bf29e6ad..2d09eff0111 100644 --- a/app/models/concerns/diff_positionable_note.rb +++ b/app/models/concerns/diff_positionable_note.rb @@ -3,6 +3,7 @@ module DiffPositionableNote extend ActiveSupport::Concern included do + delegate :on_text?, :on_image?, to: :position, allow_nil: true before_validation :set_original_position, on: :create before_validation :update_position, on: :create, if: :on_text? @@ -28,14 +29,6 @@ module DiffPositionableNote end end - def on_text? - position&.position_type == "text" - end - - def on_image? - position&.position_type == "image" - end - def supported? for_commit? || self.noteable.has_complete_diff_refs? end |