Skip to content

Commit

Permalink
refactor completed_view method (#3277)
Browse files Browse the repository at this point in the history
  • Loading branch information
akuppa9 authored Jan 5, 2024
1 parent 5170447 commit a23c2f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
13 changes: 2 additions & 11 deletions apps/dashboard/app/helpers/batch_connect/sessions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,9 @@ def custom_info_view(session)
end
end
end

def completed_view(session)
concat tag.hr
content_tag(:div) do
concat session.render_completed_view

if session.render_completed_view_error_message
content_tag(:div, class: "alert alert-danger", role: "alert") do
concat tag.p session.render_completed_view_error_message
end
end
end
def completed_view(session)
render(partial: 'batch_connect/sessions/card/completed_view', locals: { session: session })
end

def created(session)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<hr>
<div>
<%= session.render_completed_view %>
<% if session.render_completed_view_error_message %>
<div class="alert alert-danger" role="alert">
<p><%= session.render_completed_view_error_message %></p>
</div>
<% end %>
</div>

0 comments on commit a23c2f7

Please sign in to comment.