Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9133569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:30:38+00:00 2026-06-17T08:30:38+00:00

In Rails notifications, I am subscribing to process_action.action_controller, and would like to add more

  • 0

In Rails notifications, I am subscribing to “process_action.action_controller”, and would like to add more attributes to the payload. How can I do that?

I have tried using append_info_to_payload, but this seems to do nothing.

module AppendExceptionPayload
  module ControllerRuntime
    extend ActiveSupport::Concern

    protected 

    def append_info_to_payload(payload)
      super
      payload[:happy] = "HAPPY"
    end
  end
end

The subscription and above code is in a Rails engine, so this is where I make the call to add it:

require 'append_exception_payload'

module Instrument
  class Engine < ::Rails::Engine

    ActiveSupport.on_load :action_controller do
      include AppendExceptionPayload::ControllerRuntime
    end

  end
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:30:39+00:00Added an answer on June 17, 2026 at 8:30 am

    After putting up the bounty, I found a solution myself. Rails handles this really cleanly.

    Basically, the append_info_to_payload method is meant exactly for this.

    So to include session information and signed_in user information I added this to my application_controller.rb:

    def append_info_to_payload(payload)
        super
        payload[:session] = request.session_options[:id] rescue ""
        payload[:user_id] = session[:user_id] rescue "unknown"
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rails project that I would like to set up email notifications
We have a rails api that we would like to use to send notifications
One of the coolest thing in Rails 3 is notifications. But I would like
Rails has a nice idiom that makes it easy for you to have a
I have a simple rails app where user can send a mass email to
I have a Rails application that has file uploading. Once the file is uploaded
I have a rails app that sends out many notification e-mails. We have a
I currently have a dropdown that will display notifications <li class=notifications dropdown> <a class=dropdown-toggle
What gem would you recommend for sending Push Notifications to mobile devices? Context: Rails
I have a rails app that is is using cancan permission and i am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.