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 322373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:55:59+00:00 2026-05-12T08:55:59+00:00

In Rails, the closest I’ve seen to Django Signals are Observers . The problem

  • 0

In Rails, the closest I’ve seen to Django Signals are Observers. The problem with them is that they’re restricted to triggering callbacks on hardcoded events related to a model’s lifecycle.

Django signals can be created anywhere, triggered anywhere and handled anywhere. The model lifecycle callbacks are just regular signals that happen to come built-in and that are triggered by the ORM.

Does anyone know of a similarly general solution for Rails? It could be some generic Ruby library, not tied to Rails, which would be even better.


Edit: Observer is the closest thing, but it’s not what I’m looking for. It’s a one-to-many solution. Anyone can listen, but only the originating object can post. I’d like something where you declare a signal, and anyone can trigger it as well as handle it. Also, I don’t like the fact that the Ruby Observer dictates that the handler have an #update method. I’d like to be able to pass any method reference with the appropriate signature.

I could use the Ruby Observer to implement my own such broker, but I’m trying to learn if someone already did it.

  • 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-05-12T08:55:59+00:00Added an answer on May 12, 2026 at 8:55 am

    I think a closer equivalent than Rails’ Observer is the standard Ruby Observable module. It lets you add a list of observers to an object and the object can then send notifications to the observers when it changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Rails make It possible to map resources that are logically children of other resources
Rails has a nice idiom that makes it easy for you to have a
Rails: I need to set a condition in a has_many that needs the self.id
A javascript problem on a rails app. Twitter docs keep things very straightforward, however
Rails has the link_to helper, and I'm aware that its output is determined by
Rails is supposed to magically see that a request is a DELETE versus GET
Rails newbie question that I can't seem to figure out. At some point I
I have a data structure that I'm looking to model and persist in rails.
Morning, everyone! I'm working on a Rails app that is just a simple check
Rails has a has_one :through association that helps set up a one-to-one association with

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.