Skip to content

BoxCar ActiveRecord

Francis edited this page May 5, 2023 · 2 revisions

What is it?

This boxcar enables the engine to make calls to a SQL Database.

Why do you use it?

Use this box car when you want to ask questions about data in the database.

How do you use it?

# run a Train for an Active Record
boxcars = [Boxcars::ActiveRecord.new]
train = Boxcars.train.new(boxcars: boxcars)

puts train.run "How many tickets does Pedro have open?"