[obs-commits] [openSUSE/open-build-service] eed4b0: Explicitly send the notifiable type to the partials

Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: eed4b0ab48978ffb9727237a450f52db9054dd36 https://github.com/openSUSE/open-build-service/commit/eed4b0ab48978ffb972723... Author: Dani Donisa <daniel.donisa@suse.com> Date: 2020-08-14 (Fri, 14 Aug 2020) Changed paths: M src/api/app/controllers/webui/users/notifications_controller.rb M src/api/app/helpers/webui/notification_helper.rb A src/api/app/presenters/notifications_filter_presenter.rb M src/api/app/views/webui/users/notifications/_notifications_filter.html.haml M src/api/app/views/webui/users/notifications/_notifications_list.html.haml M src/api/app/views/webui/users/notifications/_update.js.erb M src/api/app/views/webui/users/notifications/index.html.haml A src/api/spec/features/beta/webui/users/notifications_controller_spec.rb Log Message: ----------- Explicitly send the notifiable type to the partials Instead of picking the notifiable type from the `params` variable, this PR makes the notifiable type explicitly available as a partial local variable and function parameters. Before this PR, the user was losing the selected notifiable type from the notifications filter when marking a notification as 'read'. This was due to the notifications/update remote partial not getting the `params[:type]` when rendering. Fixes #9908 Commit: 94f3f4e87081c3cfcc85c7323b7eb900320781be https://github.com/openSUSE/open-build-service/commit/94f3f4e87081c3cfcc85c7... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2020-08-14 (Fri, 14 Aug 2020) Changed paths: M src/api/app/controllers/webui/users/notifications_controller.rb M src/api/app/helpers/webui/notification_helper.rb A src/api/app/presenters/notifications_filter_presenter.rb M src/api/app/views/webui/users/notifications/_notifications_filter.html.haml M src/api/app/views/webui/users/notifications/_notifications_list.html.haml M src/api/app/views/webui/users/notifications/_update.js.erb M src/api/app/views/webui/users/notifications/index.html.haml A src/api/spec/features/beta/webui/users/notifications_controller_spec.rb Log Message: ----------- Merge pull request #9983 from danidoni/keep-filters-when-marking-a-notification-read-or-unread Keep the filter when marking a notification read or unread Compare: https://github.com/openSUSE/open-build-service/compare/6caf2650af2f...94f3f4...
participants (1)
-
Henne Vogelsang