From fbccae4d190c91aa689defc2fbf25744b369df05 Mon Sep 17 00:00:00 2001 From: Alex Kitchens Date: Tue, 6 Sep 2016 09:34:09 -0500 Subject: Fix Remaining Case-In-Assignment Statement Formatting Recently, the Rails team made an effort to keep the source code consistent, using Ruboco (bb1ecdcc677bf6e68e0252505509c089619b5b90 and below). Some of the case statements were missed. This changes the case statements' formatting and is consistent with changes in 810dff7c9fa9b2a38eb1560ce0378d760529ee6b and db63406cb007ab3756d2a96d2e0b5d4e777f8231. --- actionview/lib/action_view/helpers/date_helper.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'actionview/lib/action_view/helpers/date_helper.rb') diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb index c277738920..61ce1d36e0 100644 --- a/actionview/lib/action_view/helpers/date_helper.rb +++ b/actionview/lib/action_view/helpers/date_helper.rb @@ -1026,15 +1026,16 @@ module ActionView # prompt_option_tag(:month, prompt: 'Select month') # => "" def prompt_option_tag(type, options) - prompt = case options - when Hash - default_options = { year: false, month: false, day: false, hour: false, minute: false, second: false } - default_options.merge!(options)[type.to_sym] - when String - options + prompt = \ + case options + when Hash + default_options = { year: false, month: false, day: false, hour: false, minute: false, second: false } + default_options.merge!(options)[type.to_sym] + when String + options else - I18n.translate(:"datetime.prompts.#{type}", locale: @options[:locale]) - end + I18n.translate(:"datetime.prompts.#{type}", locale: @options[:locale]) + end prompt ? content_tag("option".freeze, prompt, value: "") : "" end -- cgit v1.2.3