Skip to content

Commit

Permalink
Fix various issues with the code
Browse files Browse the repository at this point in the history
  • Loading branch information
smellsblue committed Jun 27, 2024
1 parent 2d7dbb4 commit 7fe28a9
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions app/helpers/items_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def user_name(value)

def item_history_info(version)
parameters = build_history_parameters(version)
t(version.event, parameters.merge(scope: %i[history item event]))
t(version.event, **parameters.merge(scope: %i[history item event]))
end

def build_history_parameters(version)
Expand All @@ -17,8 +17,8 @@ def build_history_parameters(version)
new_total: version.changeset["current_quantity"].last
}

parameters[:amount_description] = t(version.edit_method, parameters.merge(scope: %i[history item method]))
parameters[:reason] = t(version.edit_reason, parameters.merge(scope: %i[history item reason]))
parameters[:amount_description] = t(version.edit_method, **parameters.merge(scope: %i[history item method]))
parameters[:reason] = t(version.edit_reason, **parameters.merge(scope: %i[history item reason]))
parameters
end

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/orders_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ def cancel_order_confirm(order)
# rubocop:enable Rails/OutputSafety
end

confirm(confirm_options)
confirm(**confirm_options)
end
end
4 changes: 2 additions & 2 deletions app/views/common/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<% if current_user.can_export? %>
<li role="separator" class="divider"></li>
<li><%= link_to "Export Master Inventory", exports_path %></li>
<li><%= link_to "Export Master Inventory", exports_path, data: { turbolinks: false } %></li>
<li role="separator" class="divider"></li>
<% end %>
</ul>
Expand Down Expand Up @@ -111,7 +111,7 @@
</a>
<ul class="dropdown-menu">
<% if current_user.can_backup? %>
<li><%= link_to "Download Backup", backup_path %></li>
<li><%= link_to "Download Backup", backup_path, data: { turbolinks: false } %></li>
<li role="separator" class="divider"></li>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/donors/_tabs.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="col-xs-6">
<div class="pull-right">
<% if current_user.can_view_reports? && local_assigns[:export] %>
<%= link_to "Export", export_donors_path, class: "btn btn-primary" %>
<%= link_to "Export", export_donors_path, class: "btn btn-primary", data: { turbolinks: false } %>
<% end %>
<% if current_user.can_create_donors? %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="row bottom15">
<div class="col-xs-12">
<%= button_to "Complete", complete_inventory_reconciliation_path(@reconciliation), method: :post, class: "btn btn-danger", disabled: !@reconciliation.deltas.ready_to_complete?, data: confirm(@reconciliation.deltas.complete_confirm_options) %>
<%= button_to "Complete", complete_inventory_reconciliation_path(@reconciliation), method: :post, class: "btn btn-danger", disabled: !@reconciliation.deltas.ready_to_complete?, data: confirm(**@reconciliation.deltas.complete_confirm_options) %>
</div>
</div>

Expand Down Expand Up @@ -49,6 +49,6 @@

<div class="row">
<div class="col-xs-12">
<%= button_to "Complete", complete_inventory_reconciliation_path(@reconciliation), method: :post, class: "btn btn-danger", disabled: !@reconciliation.deltas.ready_to_complete?, data: confirm(@reconciliation.deltas.complete_confirm_options) %>
<%= button_to "Complete", complete_inventory_reconciliation_path(@reconciliation), method: :post, class: "btn btn-danger", disabled: !@reconciliation.deltas.ready_to_complete?, data: confirm(**@reconciliation.deltas.complete_confirm_options) %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/survey_requests/_tabs.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<% if params[:action] == "report" %>
<div class="col-xs-6">
<div class="pull-right">
<%= link_to "Export", export_survey_request_path(@survey_request), class: "btn btn-primary" %>
<%= link_to "Export", export_survey_request_path(@survey_request), class: "btn btn-primary", data: { turbolinks: false } %>
</div>
</div>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/_tabs.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="col-xs-6">
<div class="pull-right">
<% if current_user.can_view_reports? && local_assigns[:export] %>
<%= link_to "Export", export_users_path, class: "btn btn-primary" %>
<%= link_to "Export", export_users_path, class: "btn btn-primary", data: { turbolinks: false } %>
<% end %>
<% if current_user.can_invite_user? %>
Expand Down

0 comments on commit 7fe28a9

Please sign in to comment.