1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

13 commits

Author SHA1 Message Date
Luke Lau
928b3f4f0a Add 'self' to ApplicationController CSP
This fixes the welcome page (and presumably other internal rails pages)
giving a Content-Security-Policy error whenever rack-mini-profiler tries
to load – which is enabled by default for new projects
2021-06-05 01:39:36 +01:00
Ryuta Kamizono
c81af6ae72 Enable Layout/EmptyLinesAroundAccessModifier cop
We sometimes say "✂️ newline after `private`" in a code review (e.g.
https://github.com/rails/rails/pull/18546#discussion_r23188776,
https://github.com/rails/rails/pull/34832#discussion_r244847195).

Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style
`EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059).

That cop and enforced style will reduce the our code review cost.
2019-06-13 12:00:45 +09:00
Andrew White
190744cd8e Always yield a CSP policy instance
If the app has the CSP disabled globally allow a controller action
to enable the policy for that request.
2018-03-08 14:14:09 +00:00
yuuji.yaginuma
f30ac99d0c Allow using inline style and script in the internal controllers
We use inline style and script for the view held inside Rails like
welcome page and mailer preview.
Therefore, if inline is prohibited by CSP, they will not work properly.
I think that this is not as expected.  

For that reason, I have made it possible to use inline style and script
regardless of application settings.
2018-03-08 21:17:18 +09:00
Pat Allan
acea68de02 Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
bogdanvlviv
40bdbce191
Define path with __dir__
".. with __dir__ we can restore order in the Universe." - by @fxn

Related to 5b8738c2df
2017-05-23 00:53:51 +03:00
Akira Matsuda
d1daf4c313 Privatize unneededly protected methods in Railties 2016-12-25 02:11:40 +09:00
Xavier Noria
80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria
69ab3eb57e applies new string literal convention in railties/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:15:47 +02:00
yuuji.yaginuma
35a734d671 stop using deprecated render :text in railties 2015-08-06 15:50:28 +09:00
Andrew White
1602a70fb4 Add an application controller for internal controllers 2013-12-17 03:58:35 +00:00