diff --git a/app/controllers/common/requests.rb b/app/controllers/common/requests.rb index 62b68eb8dfc4fe70adfabdae6f76549400cdce54..476a71c504521c2fd81feccafa3bacfeb0c58b58 100644 --- a/app/controllers/common/requests.rb +++ b/app/controllers/common/requests.rb @@ -8,16 +8,12 @@ module Common::Requests extend ActiveSupport::Concern - include Common::Tracking::Action - included do helper_method :current_state helper_method :request_path helper_method :requests_path before_filter :fetch_request, only: %i[update destroy show] - track_actions :update, if: :approved? - after_filter :create_notices, only: :create after_filter :dismiss_notices, only: :update end @@ -105,11 +101,6 @@ module Common::Requests end end - def track_action(event = nil, options = {}) - event ||= @req.event - super event, @req.event_attrs.merge(options) - end - def create_notices Notice::RequestNotice.create! @req if @req.persisted? end diff --git a/app/controllers/group/groups_controller.rb b/app/controllers/group/groups_controller.rb index f40e51b11284d405bf9809fc37f9702e2b40dd94..05b08e3d1fd4aa4dbf5b38adb9c1f59a13420d46 100644 --- a/app/controllers/group/groups_controller.rb +++ b/app/controllers/group/groups_controller.rb @@ -12,7 +12,6 @@ class Group::GroupsController < Group::BaseController before_filter :initialize_group, only: %w[new create] before_filter :fetch_associations, only: :destroy - track_actions :create after_filter :notify_former_users, only: :destroy guard :may_ALIAS_group? diff --git a/app/controllers/group/memberships_controller.rb b/app/controllers/group/memberships_controller.rb index 90327cf4b9e7257164e1c90f26b6b182a4ef8fa3..4036e417cf5275185d142bcb3f57c0dabeab6d82 100644 --- a/app/controllers/group/memberships_controller.rb +++ b/app/controllers/group/memberships_controller.rb @@ -5,14 +5,11 @@ # class Group::MembershipsController < Group::BaseController - include Common::Tracking::Action guard index: :may_list_memberships?, destroy: :may_destroy_membership?, create: :may_create_membership? - track_actions :create, :destroy, unless: :federation_view? - # # list all the memberships # diff --git a/app/controllers/group/requests_controller.rb b/app/controllers/group/requests_controller.rb index 61b29c8742a6a2e9ae365fd31f3777d63f7ab58b..23edc45add4f1f5fc51b6b6cf3c70ebcc1c35906 100644 --- a/app/controllers/group/requests_controller.rb +++ b/app/controllers/group/requests_controller.rb @@ -12,8 +12,6 @@ class Group::RequestsController < Group::BaseController # permissions handled by model: guard create: :allow, update: :allow, destroy: :allow - track_actions :create - rescue_render create: :index def index @@ -48,10 +46,6 @@ class Group::RequestsController < Group::BaseController REQUEST_TYPES[params[:type]].try.constantize end - def track_action - super "request_to_#{params[:type]}" if REQUEST_TYPES.key? params[:type] - end - def current_view case params[:view] when 'incoming' then :to_group diff --git a/app/controllers/group/structures_controller.rb b/app/controllers/group/structures_controller.rb index 05c91330e9ddedd5d8b16ff7bcf11782368a1e41..70ba7f143864a846b597702c6c204ff9ca18a284 100644 --- a/app/controllers/group/structures_controller.rb +++ b/app/controllers/group/structures_controller.rb @@ -1,10 +1,7 @@ class Group::StructuresController < Group::SettingsController - include Common::Tracking::Action guard :may_edit_group_structure?, actions: %i[new create destroy] - track_actions :create - def show; end def new @@ -47,7 +44,4 @@ class Group::StructuresController < Group::SettingsController params.fetch(:group, {}).permit :name, :full_name, :language end - def track_action - super("#{action_string}_group", group: @committee) - end end diff --git a/app/controllers/stars_controller.rb b/app/controllers/stars_controller.rb index ef58db0093b917e02ee6f6b5fb0398c9dfc65ebe..fceb432c4a0a3f6765094712335aba8dc2625406 100644 --- a/app/controllers/stars_controller.rb +++ b/app/controllers/stars_controller.rb @@ -24,6 +24,7 @@ class StarsController < ApplicationController include Common::Tracking::Action before_filter :fetch_starred + track_actions :create def create @starred.stars.create(user: current_user)