diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-08-23 10:24:08 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-09-03 13:28:46 +0900 |
commit | 7c70430ce063af501154591f114dfc02e559f774 (patch) | |
tree | 8cd1d61de778ce17e06db8687278f01099b91e1b /actionview/lib | |
parent | f2f00ca54a83e86ef845ec9fb3e9e373d367550f (diff) | |
download | rails-7c70430ce063af501154591f114dfc02e559f774.tar.gz rails-7c70430ce063af501154591f114dfc02e559f774.tar.bz2 rails-7c70430ce063af501154591f114dfc02e559f774.zip |
Fix broken heredoc indentation caused by rubocop auto-correct
All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772.
But heredocs was still kept absolute position. This commit aligns
heredocs indentation for consistency.
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/layouts.rb | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb index b6bf6b9374..dd5f6e7300 100644 --- a/actionview/lib/action_view/layouts.rb +++ b/actionview/lib/action_view/layouts.rb @@ -290,11 +290,12 @@ module ActionView RUBY end - layout_definition = case _layout - when String - _layout.inspect - when Symbol - <<-RUBY + layout_definition = \ + case _layout + when String + _layout.inspect + when Symbol + <<-RUBY #{_layout}.tap do |layout| return #{default_behavior} if layout.nil? unless layout.is_a?(String) || !layout @@ -303,21 +304,21 @@ module ActionView end end RUBY - when Proc - define_method :_layout_from_proc, &_layout - protected :_layout_from_proc - <<-RUBY + when Proc + define_method :_layout_from_proc, &_layout + protected :_layout_from_proc + <<-RUBY result = _layout_from_proc(#{_layout.arity == 0 ? '' : 'self'}) return #{default_behavior} if result.nil? result RUBY - when false - nil - when true - raise ArgumentError, "Layouts must be specified as a String, Symbol, Proc, false, or nil" - when nil - name_clause - end + when false + nil + when true + raise ArgumentError, "Layouts must be specified as a String, Symbol, Proc, false, or nil" + when nil + name_clause + end self.class_eval <<-RUBY, __FILE__, __LINE__ + 1 def _layout(formats) |