Skip to content

Commit

Permalink
remove input_formats instance variable memoization
Browse files Browse the repository at this point in the history
  • Loading branch information
ralph committed Nov 21, 2011
1 parent 139332f commit a8e7d1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/delocalize/localized_date_time_parser.rb
Expand Up @@ -61,7 +61,7 @@ def translate_month_and_day_names(datetime)
def input_formats(type)
# Date uses date formats, all others use time formats
type = type == Date ? :date : :time
((@input_formats ||= {})[I18n.locale] ||= {})[type] ||= I18n.t(:"#{type}.formats").slice(*I18n.t(:"#{type}.input.formats")).values
I18n.t(:"#{type}.formats").slice(*I18n.t(:"#{type}.input.formats")).values
end

def apply_regex(format)
Expand Down

0 comments on commit a8e7d1a

Please sign in to comment.