Sha256: a28f0df04b8eb3dfca1151c9264e9824d881c837000cfaa6faad50bcf305a905
Contents?: true
Size: 448 Bytes
Versions: 14
Compression:
Stored size: 448 Bytes
Contents
module Mongoid #:nodoc: module Attributes #:nodoc: # Process the provided attributes casting them to their proper values if a # field exists for them on the +Document+. def process(fields, params) attributes = HashWithIndifferentAccess.new(params) fields.values.each do |field| value = field.set(attributes[field.name]) attributes[field.name] = value if value end attributes end end end
Version data entries
14 entries across 14 versions & 1 rubygems