app/controllers/decidim/meetings/admin/invites_controller.rb in decidim-meetings-0.28.4 vs app/controllers/decidim/meetings/admin/invites_controller.rb in decidim-meetings-0.29.0.rc1
- old
+ new
@@ -4,18 +4,18 @@
module Meetings
module Admin
# Controller that allows inviting users to join a meeting.
#
class InvitesController < Admin::ApplicationController
- helper_method :invites
+ helper_method :collection
+ include Decidim::Meetings::Admin::Invites::Filterable
+
def index
enforce_permission_to(:read_invites, :meeting, meeting:)
- @query = params[:q]
- @status = params[:status]
-
+ @invites = filtered_collection
@form = form(MeetingRegistrationInviteForm).instance
end
def create
enforce_permission_to(:invite_attendee, :meeting, meeting:)
@@ -39,11 +39,11 @@
def meeting
@meeting ||= Meeting.where(component: current_component).find(params[:meeting_id])
end
- def invites
- @invites ||= Decidim::Admin::Invites.for(meeting.invites, @query, @status).page(params[:page]).per(15)
+ def collection
+ meeting.invites
end
end
end
end
end