lib/active_model/serializer/fieldset.rb in cheap_ams-0.10.8 vs lib/active_model/serializer/fieldset.rb in cheap_ams-0.10.10

- old
+ new

@@ -16,18 +16,18 @@ end private ActiveModelSerializers.silence_warnings do - attr_reader :raw_fields, :root + attr_reader :raw_fields, :root end def parsed_fields if raw_fields.is_a?(Hash) raw_fields.inject({}) { |h, (k, v)| h[k.to_sym] = v.map(&:to_sym); h } elsif raw_fields.is_a?(Array) if root.nil? - raise ArgumentError, 'The root argument must be specified if the fileds argument is an array.' + raise ArgumentError, 'The root argument must be specified if the fields argument is an array.' end hash = {} hash[root.to_sym] = raw_fields.map(&:to_sym) hash else