one git repo to rule them all\!

This commit is contained in:
Senad Uka
2015-01-22 06:38:48 +01:00
parent c003584f7e
commit 23a6fda854
149 changed files with 967 additions and 4 deletions

View File

@@ -0,0 +1,34 @@
# Ribica front office API
## Getting started:
1. install postgresql and libraries (for native 'pg' gem to be able to compile)
2. run `bundle install`
3. create postgresql user protected with password
4. create postgresql database
5. copy config.rb.example to config.rb and change the information inside of it
6. run `rake db:schema:load`
7. run `gem install rerun`
## Running dev server (with autoreloading)
1. run `rerun ruby app.rb`
## Generating migrations
Sinatra has a different syntax than rails to generate migration:
`rake db:create_migration NAME=create_categories`
## Handling shared models
Some of models will necesarrily be shared between front and back office.
Migrations for those models *must be in front office* and
back office will just have a model file with custom code if needed.
When generating active scaffold - migration is generated by default so it
needs to be removed before using it.