Fixes links in Admin::Organizations to handle filters + pages
This commit is contained in:
@@ -11,12 +11,12 @@ class Admin::OrganizationsController < Admin::BaseController
|
||||
|
||||
def verify
|
||||
@organization.verify
|
||||
redirect_to action: :index, filter: @filter
|
||||
redirect_to request.query_parameters.merge(action: :index)
|
||||
end
|
||||
|
||||
def reject
|
||||
@organization.reject
|
||||
redirect_to action: :index, filter: @filter
|
||||
redirect_to request.query_parameters.merge(action: :index)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<% end %>
|
||||
<% if can? :verify, organization %>
|
||||
<td><%= link_to t('admin.organizations.index.verify'),
|
||||
verify_admin_organization_path(organization, filter: @filter),
|
||||
verify_admin_organization_path(organization, request.query_parameters),
|
||||
method: :put
|
||||
%>
|
||||
</td>
|
||||
@@ -36,7 +36,7 @@
|
||||
<% end %>
|
||||
<% if can? :reject, organization %>
|
||||
<td><%= link_to t('admin.organizations.index.reject'),
|
||||
reject_admin_organization_path(organization, filter: @filter),
|
||||
reject_admin_organization_path(organization, request.query_parameters),
|
||||
method: :put
|
||||
%>
|
||||
</td>
|
||||
@@ -45,4 +45,4 @@
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= paginate @organizations %>
|
||||
<%= paginate @organizations %>
|
||||
|
||||
Reference in New Issue
Block a user