diff options
Diffstat (limited to 'actionview/lib/action_view/helpers/tags/month_field.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/tags/month_field.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/tags/month_field.rb b/actionview/lib/action_view/helpers/tags/month_field.rb index 463866a181..b582bb4f79 100644 --- a/actionview/lib/action_view/helpers/tags/month_field.rb +++ b/actionview/lib/action_view/helpers/tags/month_field.rb @@ -6,7 +6,7 @@ module ActionView class MonthField < DatetimeField # :nodoc: private def format_date(value) - value.try(:strftime, "%Y-%m") + value&.strftime("%Y-%m") end end end |