Method: ActivityNotification::NotificationsController#open_all

Defined in:
app/controllers/activity_notification/notifications_controller.rb

#open_all(params) ⇒ Response

Opens all notifications of the target.

POST /:target_type/:target_id/notifications/open_all

Returns JavaScript view for ajax request or redirects to back as default.

Parameters:

  • params (Hash)

    Request parameters

Options Hash (params):

  • :filter (String) — default: nil

    Filter option to load notification index by their status (Nothing as auto, ‘opened’ or ‘unopened’)

  • :limit (String) — default: nil

    Maximum number of notifications to return

  • :without_grouping (String) — default: 'false'

    Whether notification index will include group members

  • :with_group_members (String) — default: 'false'

    Whether notification index will include group members

  • :filtered_by_type (String) — default: nil

    Notifiable type to filter notification index

  • :filtered_by_group_type (String) — default: nil

    Group type to filter notification index, valid with :filtered_by_group_id

  • :filtered_by_group_id (String) — default: nil

    Group instance ID to filter notification index, valid with :filtered_by_group_type

  • :filtered_by_key (String) — default: nil

    Key of notifications to filter notification index

  • :later_than (String) — default: nil

    ISO 8601 format time to filter notification index later than specified time

  • :earlier_than (String) — default: nil

    ISO 8601 format time to filter notification index earlier than specified time

  • :ids (Array) — default: nil

    Array of specific notification IDs to open

  • :reload (String) — default: 'true'

    Whether notification index will be reloaded

Returns:

  • (Response)

    JavaScript view for ajax request or redirects to back as default



49
50
51
52
# File 'app/controllers/activity_notification/notifications_controller.rb', line 49

def open_all
  @opened_notifications = @target.open_all_notifications(params)
  return_back_or_ajax
end