Cannot use the `append_content_security_policy_directives` method in `ApplicationController`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the generated sorbet/rbi/gems/secure_headers@7.1.0.rbi and the ApplicationController usage described in the issue. Trace how SecureHeaders is included or extended in ActionController and how Tapioca links those declarations. Done means Sorbet recognizes append_content_security_policy_directives when called from ApplicationController, with coverage for the reported setup.
Written by the indexing model from the issue text.
Description
The append_content_security_policy_directives from SecureHeaders can be referenced in ApplicationController as follows:
class ApplicationController < ActionController::Base
def foo
append_content_security_policy_directives(xxxx)
end
end
However, Sorbet seems unable to find append_content_security_policy_directives.
Method
append_content_security_policy_directivesdoes not exist onApplicationController
By the way, the method is generated in RBI as follows:
# sorbet/rbi/gems/secure_headers@7.1.0.rbi
module SecureHeaders
def append_content_security_policy_directives(additions); end
# ...
end
Therefore, it's possible that ActionController and SecureHeaders are not linked correctly.
- Dominant language
- Ruby
- Stars
- 873
- Forks
- 164
- Avg merge
- 4d 27m
- Merged PRs (30d)
- 9
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/tapioca
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100