This is a simple template to help you play with Active Record, when you don't need or don't want to create a full Rails app.
It gives you a...
- Gemfile
- A place to put you seeds
- A place to put your database configuration
- A place to define the database schema
- Define a database name on
db/database_name.rb
- Define the database schema on
db/schema.rb
- Create some seeds if you need them on
db/seed.rb
- Add examples on the
examples/
dir, but require first theexamples/config
-
Install the dependencies with
bundle install
. -
Database setup - run the command:
ruby db/setup.rb
- Run the examples with
ruby examples/<file name>
. For example:
ruby example/00_example.rb
- Change the seeds on
db/seeds.rb
and re-runruby db/setup.rb
to test different scenarios.