aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2019-08-01 17:45:54 +0900
committerAkira Matsuda <ronnie@dio.jp>2019-08-01 17:58:00 +0900
commitd21e5fbc70c54e31b71483452d975448659fac67 (patch)
tree6a522495fa1b4907d74e9dba3bd59e26ceb6a02a
parentaf2129b4c74732c88ffce76e5c55c805cb9431f6 (diff)
downloadrails-d21e5fbc70c54e31b71483452d975448659fac67.tar.gz
rails-d21e5fbc70c54e31b71483452d975448659fac67.tar.bz2
rails-d21e5fbc70c54e31b71483452d975448659fac67.zip
These methods doesn't have to be `protected`
-rw-r--r--actionview/lib/action_view/helpers/url_helper.rb6
-rw-r--r--actionview/lib/action_view/layouts.rb3
2 files changed, 3 insertions, 6 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb
index 1b05d4aa71..cebb2aea4d 100644
--- a/actionview/lib/action_view/helpers/url_helper.rb
+++ b/actionview/lib/action_view/helpers/url_helper.rb
@@ -42,12 +42,11 @@ module ActionView
end
end
- def _back_url # :nodoc:
+ private def _back_url # :nodoc:
_filtered_referrer || "javascript:history.back()"
end
- protected :_back_url
- def _filtered_referrer # :nodoc:
+ private def _filtered_referrer # :nodoc:
if controller.respond_to?(:request)
referrer = controller.request.env["HTTP_REFERER"]
if referrer && URI(referrer).scheme != "javascript"
@@ -56,7 +55,6 @@ module ActionView
end
rescue URI::InvalidURIError
end
- protected :_filtered_referrer
# Creates an anchor element of the given +name+ using a URL created by the set of +options+.
# See the valid options in the documentation for +url_for+. It's also possible to
diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb
index 74e8e80e07..db92f905d4 100644
--- a/actionview/lib/action_view/layouts.rb
+++ b/actionview/lib/action_view/layouts.rb
@@ -305,8 +305,7 @@ module ActionView
end
RUBY
when Proc
- define_method :_layout_from_proc, &_layout
- protected :_layout_from_proc
+ private define_method :_layout_from_proc, &_layout
<<-RUBY
result = _layout_from_proc(#{_layout.arity == 0 ? '' : 'self'})
return #{default_behavior} if result.nil?