Skip to content

Commit

Permalink
Rename Subscription#reject! to Subscription#reject as there's only on…
Browse files Browse the repository at this point in the history
…e version of the method
  • Loading branch information
lifo committed Nov 5, 2015
1 parent de64aa3 commit 37fe489
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/action_cable/channel/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module Channel
# class ChatChannel < ApplicationCable::Channel
# def subscribed
# @room = Chat::Room[params[:room_number]]
# reject! unless current_user.can_access?(@room)
# reject unless current_user.can_access?(@room)
# end
# end
#
Expand Down Expand Up @@ -198,7 +198,7 @@ def subscription_confirmation_sent?
@subscription_confirmation_sent
end

def reject!
def reject
@reject_subscription = true
end

Expand Down
2 changes: 1 addition & 1 deletion test/channel/rejection_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class ActionCable::Channel::RejectionTest < ActiveSupport::TestCase
class SecretChannel < ActionCable::Channel::Base
def subscribed
reject! if params[:id] > 0
reject if params[:id] > 0
end
end

Expand Down

0 comments on commit 37fe489

Please sign in to comment.