Extract method to open links in a new window

This way we can slightly simplify the code.
This commit is contained in:
Javi Martín
2023-10-15 16:39:01 +02:00
parent e19c16d4e2
commit c2710de5fc
11 changed files with 20 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
class Proposals::NewComponent < ApplicationComponent
include Header
attr_reader :proposal
delegate :new_window_link_to, to: :helpers
def initialize(proposal)
@proposal = proposal