Sha256: 20c9861195bfd2dd66b2536769d32a737ba8c578500fa2d0ad1bd8ee8a47f006
Contents?: true
Size: 439 Bytes
Versions: 34
Compression:
Stored size: 439 Bytes
Contents
module Paperclip module Interpolations class PluralCache def initialize @symbol_cache = {}.compare_by_identity @klass_cache = {}.compare_by_identity end def pluralize_symbol(symbol) @symbol_cache[symbol] ||= symbol.to_s.downcase.pluralize end def underscore_and_pluralize_class(klass) @klass_cache[klass] ||= klass.name.underscore.pluralize end end end end
Version data entries
34 entries across 34 versions & 5 rubygems