method
rows
v4.1.8 -
Show latest stable
- Class:
ActiveRecord::FixtureSet::File
rows()private
No documentation available.
# File activerecord/lib/active_record/fixture_set/file.rb, line 29
def rows
return @rows if @rows
begin
data = YAML.load(render(IO.read(@file)))
rescue ArgumentError, Psych::SyntaxError => error
raise Fixture::FormatError, "a YAML error occurred parsing #{@file}. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at http://www.yaml.org/faq.html\nThe exact error was:\n #{error.class}: #{error}", error.backtrace
end
@rows = data ? validate(data).to_a : []
end