Skip to content

Commit

Permalink
refactor and render created method (#3165)
Browse files Browse the repository at this point in the history
Refactor this method to use a partial instead of generating this div programatically.

Co-authored-by: Jeff Ohrstrom <[email protected]>

---------

Co-authored-by: Jeff Ohrstrom <[email protected]>
  • Loading branch information
akuppa9 and johrstrom authored Nov 6, 2023
1 parent 73c6375 commit 892e869
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 1 addition & 5 deletions apps/dashboard/app/helpers/batch_connect/sessions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ def custom_info_view(session)
end

def created(session)
content_tag(:p) do
concat content_tag(:strong, t('dashboard.batch_connect_sessions_stats_created_at'))
concat " "
concat Time.at(session.created_at).localtime.strftime("%Y-%m-%d %H:%M:%S %Z")
end
render(partial: 'batch_connect/sessions/card/created', locals: { session: session })
end

def session_time(session)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<p>
<strong><%= t('dashboard.batch_connect_sessions_stats_created_at') %></strong>
<%= Time.at(session.created_at).localtime.strftime("%Y-%m-%d %H:%M:%S %Z") %>
</p>

0 comments on commit 892e869

Please sign in to comment.