aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2016-04-20 10:22:57 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2016-04-20 12:02:21 +0530
commit01a7a01bf111a985788c7167535026c49cf1180a (patch)
treea2f1230fd97c7d7dff23ec57e55de4f097714910 /actionview
parentd06f0a6e46ca2fd2508ec92ecf52c5e3e0c93b6e (diff)
downloadrails-01a7a01bf111a985788c7167535026c49cf1180a.tar.gz
rails-01a7a01bf111a985788c7167535026c49cf1180a.tar.bz2
rails-01a7a01bf111a985788c7167535026c49cf1180a.zip
Fix example for css_class_attribute and fix indentation
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/date_helper.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb
index d83cfbb734..9042b9cffd 100644
--- a/actionview/lib/action_view/helpers/date_helper.rb
+++ b/actionview/lib/action_view/helpers/date_helper.rb
@@ -1007,15 +1007,15 @@ module ActionView
end
# Builds the css class value for the select element
- # css_class_attribute(:year, 'date optional', with_css_classes: { year: 'my-year' })
+ # css_class_attribute(:year, 'date optional', { year: 'my-year' })
# => "date optional my-year"
def css_class_attribute(type, html_options_class, options) # :nodoc:
css_class = case options
- when Hash
- options[type.to_sym]
- else
- type
- end
+ when Hash
+ options[type.to_sym]
+ else
+ type
+ end
[html_options_class, css_class].compact.join(' ')
end