instance method
validate
Ruby on Rails 3.2.22.5
Since v3.2.22.5 Last seen in v3.2.22.5 PrivateSignature
validate(data)
Validate our unmarshalled data.
Parameters
-
datareq
Source
# File activerecord/lib/active_record/fixtures/file.rb, line 55
def validate(data)
unless Hash === data || YAML::Omap === data
raise Fixture::FormatError, 'fixture is not a hash'
end
raise Fixture::FormatError unless data.all? { |name, row| Hash === row }
data
end
Defined in activerecord/lib/active_record/fixtures/file.rb line 55
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Fixtures::File