Vladimir Dementyev

Results 297 comments of Vladimir Dementyev

You can use `params: ...` like in controller tests: ```ruby expect { connect params: {channel: "somechannel", resource_id: "somebogusid"} }.to have_rejected_connection ``` > If I mount my ActionCable app as such:...

> not sure if any documentation updates are needed, also not sure what section in the changelog to put it under as I wasn't sure if the next release would...

Could you please provide an example (or a test case in the PR 😉) demonstrating a use case for this change?

Hey @svyatov! I like the idea of adding a DSL method to check aliases; I'd suggest using something less verbose, e.g., `alias_rule :index?` (similarly to the policy class API). I...

> allowed_to? when called without a record seems to ignore the options and raises ActionPolicy::NotFound. Could you please share the full exception message? It should contain the class of the...

> The documentation does not explicitly say that calling authorized_scope means you don't need to call authorize! Yeah, there is no such feature, because scoping not always means the action...

Hey @ingnam! That looks like a different problem: `GraphQL::Pagination::ActiveRecordRelationConnection` instance is passed as the record, which we don't know how to resolve. Likely, related to some GraphQL-ruby changes or other...

@robbevp The problem is that `controller_name.classify.safe_constantize` returns `nil` for some reason (though we definitely have the `Report` class). What if you add `Report` as an argument? ```ruby authorize! Report ```...

@robbevp Could you please take a look at the question above?

Hm, interesting; could you share the results of the following expression (executed right before `authorize!`): - `сontroller_name` - `controller_name.classify` - `controller_name.classify.constantize`