Channel wildcard using FayeRails::Controller #18

Closed
endel opened this Issue Sep 26, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Collaborator

endel commented Sep 26, 2012

I need to do something like this:

class WidgetController < FayeRails::Controller
  channel '/widgets/**' do
    monitor :subscribe do
      # This callback never works
    end
  end

  channel '/widgets/1' do
    monitor :subscribe do
      # This one works fine
    end
  end
end

I've read the docs and didn't found if that is possible. Looking through the class FayeRails::Controller::Channel, it seems that channels can only be hardly defined, like '/widgets/1', isn't it?

If I mapping a channel with wildcard on Rails routes is possible, why I can't on the Controller's channel definition?
Thanks for the attention.

Owner

jamesotron commented Sep 26, 2012

I agree. I'll look at the implementation and refresh my memory.

@endel endel added a commit to endel/faye-rails that referenced this issue Oct 16, 2012

@endel endel Support wildcard monitoring. (issue #18) 42f49c0

@endel endel added a commit to endel/faye-rails that referenced this issue Oct 16, 2012

@endel endel Refractor channel pattern matcher using File.fnmatch. #18 8080cf0

endel closed this Oct 16, 2012

endel reopened this Oct 16, 2012

endel closed this Oct 16, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment