From a6079d6469572e0af60c7e60f9454202ee2a999c Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Wed, 1 Feb 2012 16:57:35 -0500 Subject: [PATCH] Adding acts_as_list to habit... doesn't seem necessary, but was part of the tutorial so I'll leave it in --- Gemfile | 3 ++- app/models/habit.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index e06a0ca548..d0ccdd90b7 100644 --- a/Gemfile +++ b/Gemfile @@ -40,4 +40,5 @@ gem 'jquery-rails' gem 'devise', '>= 2.0' gem 'whenever' gem 'mysql2' -gem 'therubyracer' \ No newline at end of file +gem 'therubyracer' +gem "acts_as_list" \ No newline at end of file diff --git a/app/models/habit.rb b/app/models/habit.rb index 14a2cec3c4..6ced909a3e 100644 --- a/app/models/habit.rb +++ b/app/models/habit.rb @@ -4,8 +4,8 @@ class Habit < ActiveRecord::Base ONE_TIME = 3 belongs_to :user - default_scope :order => 'position ASC' + acts_as_list # TODO set cron for this def self.clear_done