Oct 16 2010
- 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments
In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].
DiUS is starting a bowling club. To help with the club, we have engaged you to program a scoring system.
The features on the system are:
E.g, if a bowler rolls, 4,4
#Make sure the postgres App is running on computer | |
#Carrierwave works with ORM such as Active Record and Datamapper; | |
rails new carrier_wave_app -d postgresql | |
add production and development database to database.yml #make sure you do not add one of the fields to production | |
rails g scaffold art_galleries name:string location:string avatar:text #Also create the table in migrations folder; | |
#Is it added to the protected attributes method in the controller; | |
#Add root_to in the config.routes; | |
gem 'carrierwave' | |
rails generate uploader Avatar #Give you a class in app/uploaders/avatar_uploader.rb | |
rails g migration add_avatar_to_art_galleries avatar:string |