Skip to content

Commit

Permalink
Minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvilleneuve committed Feb 13, 2025
1 parent 07cacd7 commit af22de9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/controllers/concerns/sort_params.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module SortParams
extend ActiveSupport::Concern

included do
helper_method :sort_params
end

private

def sort_params
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module UserListUploads
class UserRowCellsController < ApplicationController
class UserRowCellsController < BaseController
before_action :set_user_list_upload, :set_user_row

def edit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</button>

<button type="submit">
<%= link_to user_list_upload_user_row_path(user_list_upload_id: @user_list_upload.id, id: user_row.id, sort_by: params[:sort_by], sort_direction: params[:sort_direction]) do %>
<%= link_to user_list_upload_user_row_path({ user_list_upload_id: @user_list_upload.id, id: user_row.id }.merge(sort_params)) do %>
<i class="ri-close-line text-danger"></i>
<% end %>
</button>
Expand Down

0 comments on commit af22de9

Please sign in to comment.