mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #33620 from bogdanvlviv/fix-rubocop-offenses
Fix rubocop offenses
This commit is contained in:
commit
7e3a0a947f
2 changed files with 2 additions and 2 deletions
|
@ -46,7 +46,7 @@ module ActionController #:nodoc:
|
||||||
# allowed via {CORS}[https://en.wikipedia.org/wiki/Cross-origin_resource_sharing]
|
# allowed via {CORS}[https://en.wikipedia.org/wiki/Cross-origin_resource_sharing]
|
||||||
# will also be able to create XHR requests. Be sure to check your
|
# will also be able to create XHR requests. Be sure to check your
|
||||||
# CORS whitelist before disabling forgery protection for XHR.
|
# CORS whitelist before disabling forgery protection for XHR.
|
||||||
#
|
#
|
||||||
# CSRF protection is turned on with the <tt>protect_from_forgery</tt> method.
|
# CSRF protection is turned on with the <tt>protect_from_forgery</tt> method.
|
||||||
# By default <tt>protect_from_forgery</tt> protects your session with
|
# By default <tt>protect_from_forgery</tt> protects your session with
|
||||||
# <tt>:null_session</tt> method, which provides an empty session
|
# <tt>:null_session</tt> method, which provides an empty session
|
||||||
|
|
|
@ -105,7 +105,7 @@ namespace :changelog do
|
||||||
current_contents = File.read(fname)
|
current_contents = File.read(fname)
|
||||||
|
|
||||||
header = "## Rails #{version} (#{Date.today.strftime('%B %d, %Y')}) ##\n\n"
|
header = "## Rails #{version} (#{Date.today.strftime('%B %d, %Y')}) ##\n\n"
|
||||||
header += "* No changes.\n\n\n" if current_contents =~ /\A##/
|
header += "* No changes.\n\n\n" if current_contents.start_with?("##")
|
||||||
contents = header + current_contents
|
contents = header + current_contents
|
||||||
File.write(fname, contents)
|
File.write(fname, contents)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue