Sha256: 9aa268f678dc2613bd2043efe3400cfce9b19e21a8c3816feb9a7ff98e4df1e8
Contents?: true
Size: 572 Bytes
Versions: 18
Compression:
Stored size: 572 Bytes
Contents
# This class has dubious semantics and we only have it so that people can write # params[:key] instead of params['key']. class Mash < HashWithIndifferentAccess def initialize *args, &block ActiveSupport::Deprecation.warn("Mash is deprecated, and should be replaced with HashWithIndifferentAccess") super end end unless Hash.respond_to?(:to_mash) class Hash def to_mash ActiveSupport::Deprecation.warn("Hash#to_mash is deprecated, and should be replaced with #with_indifferent_access") HashWithIndifferentAccess.new(self) end end end
Version data entries
18 entries across 18 versions & 1 rubygems