This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'delayed_job' | |
gem 'delayed_job_mongoid' | |
gem 'thin' | |
gem 'heroku' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I strongly suggest using object id's instead of auto incrementing id's | |
# but since you're here, I'm assuming you've already got your heart set! | |
# First, create a counter via mongodb console | |
db.counter.insert({_id:"something",count:0}) | |
# Now, automatically use the counter on save | |
class Something |