Create Database config file
cp config/database.yml.example config/database.yml
Create Database and Test data
rake db:bootstrap_and_seed
Start Rails 4
rails s
or
rails s -p 3000 -b site.com
Open browser
localhost:3000
git clone git@github.com:the-teacher/the_sortable_tree.git
cd the_sortable_tree/spec/dummy_app/
# cp config/database.yml.example config/database.yml
rake db:bootstrap RAILS_ENV=test
rspec
The dummy app supports a number ways to add a sortable tree to the model, which can be
set by the environment variable SORTABLE_TREE_TYPE
.
awesome_nested_set
uses awesome_nested_set,ancestry
: with ancestry, andancestry_acts_as_list
: with both ancestry and acts_as_list.
Note that you need to set the environment variable when seeding the database as well as when running the rails server or tests.