I installed by putting the following line in Gemfile and 'bundle install':
gem 'acts_as_list', '>= 0.1.0'
However, when I try to use it, the results are not as expected:
technician.move_to_top #works => position = 1
technician.move_to_bottom #does not work properly; also makes position = 1
technician.move_higher #does not work; returns nil
technician.move_lower #does not work; also returns nil
Does this plugin just doesn't work with rails 3 or am I missing a step?
here is the code I'm using:
class WorkQueue < ActiveRecord::Base
has_many :technicians, :order => "position"
end
class Technician < ActiveRecord::Base
belongs_to :work_queue
acts_as_list :scope => "work_queue_id" #I also tried using work_queue
end
this is the console:
wq = WorkQueue.new
technician = Technician.last
wq.technicians << technician