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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:31:15+00:00 2026-05-31T03:31:15+00:00

Trying to implement a simple notification system based on private pub ( something like

  • 0

Trying to implement a simple notification system based on private pub ( something like juggernaut ). by Ryan bates see: http://railscasts.com/episodes/316-private-pub

Problem: Im unable to send a message true private pub from a controller

Some code:

inside header.haml

= subscribe_to "/notifications"
= javascript_include_tag APP_CONFIG['faye'] ( includes JS wich is correct )

inside application.coffee

PrivatePub.subscribe "/notifications", (data, channel) ->
alert data

inside any controller action

PrivatePub.publish_to("/notifications", "some test data to send")

–

This does not work, wanted behavior is that the “some test data to send ” is being displayed in an alert on any page I’m on in the rails app. Ive tried several times the tutorial on rails cast, cloned the private pub example code repo, but nothing works sending from a controller.

UPDATE:

Anyone could help provide a example of private pub app in a repro publishing to a channel from a controller?

UPDATE2
It seems as long as there is a create action it works, but without a create action it is not.
I would like to be able to just send some data from anywhere in a controller to the app with a javascript command. Like ” send private pub message load popup ” for example, what do i Missi n above code that makes this not work?

  • 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-31T03:31:17+00:00Added an answer on May 31, 2026 at 3:31 am

    I finally fixed the issues, since no real answers I grant to Brandon if thats possible

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

Sidebar

Related Questions

I've been trying to implement a simple component-based game object architecture using Objective-C, much
I'm trying to implement a very simple footer notification element to slide up for
I'm trying to implement Simple chat using Servlet 3.0 and Comet pattern based on
I'm trying to implement a simple login system in Rails, but when I try
I'm trying to implement the simple-linkedinphp library (it's found at http://code.google.com/p/simple-linkedinphp/ ) It runs
I'm trying to implement a simple HTTP server in Android that handles POST requests,
I'm trying to implement simple Event Bus I started like this: public class RegistrationData
I'm trying to implement a simple Inbox system for users of my app so
I'm trying to implement a simple messaging system in CakePHP 1.3. What I need
I'm trying to implement a simple tagging system (messing around in php)... I use

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.