Skip to main content

All Questions

0 votes
1 answer
754 views

Rails: Ancestry + Acts_as_List Gems Not Working as Expected When Changing Parent Object

I have a Ruby on Rails 3 app which uses the ancestry gem to provide a hierarchical tree structure for a model in combination with the acts_as_list gem to provide explicit positioning within each level ...
dSquared's user avatar
  • 9,795
0 votes
1 answer
766 views

dependent destroy with acts_as_tree and acts_as_list

Currently I upgrade rails 2 application to rails 3.2.13 wich use acts_as_tree and acts_as_list. Before, the upgrade it works well. Since, I have a problem with acts_as_tree and acts_as_list with ...
CupraR_On_Rails's user avatar
4 votes
1 answer
2k views

rails: sort a has_many using :order is not working due to order by timestamp

I have a rails model let say User with a has many relationship with Post. Post contains an attribute named position that stores the position (acts_as_list gem). The position stores the position on the ...
Mateu's user avatar
  • 2,678
1 vote
2 answers
1k views

prevent default scope from being applied to acts_as_list

I use acts_as_list to generate slot numbers of books: acts_as_list :scope => :book_id, :column => :slot and have a default scope that prevents deleted (soft delete) books from getting in to ...
amit_saxena's user avatar
  • 7,588
0 votes
1 answer
161 views

using acts_as_list and transferring floats to int value

I would like to use acts_as_list in an app that was originally written in php and is being moved to rails. We used a 'position' value that was a float such that if a user wanted to put something ...
timpone's user avatar
  • 19.7k
2 votes
1 answer
2k views

Reordering in ActiveAdmin

sometime we need to reorder our resources and acts_as_list is really useful for this task. My question is: What is the best way to implement reordering of some resources in ActiveAdmin framework. I ...
Uko's user avatar
  • 13.3k
1 vote
3 answers
2k views

Rails 3.1 - Drag Drop Re-order without acts_as_list?

I want to allow a drag and drop reorder facility within my app. I'm aware I can do this with acts_as_list, and have followed the Rails Recipe on this. However, due to the way my app is built, the item ...
Raoot's user avatar
  • 1,771
2 votes
1 answer
428 views

Create a custom move_up route and move_down actions/route Rails

I am trying to create two little buttons with an up and down arrow, and sort my Products based on that. I have a model called Product, and am using acts_as_list to keep track of position. Do I do ...
ruevaughn's user avatar
  • 1,319
2 votes
1 answer
3k views

Ordering position on Model during update

I am using acts_as_list on my Product model, and trying to make it so you can manually edit the position. Currently if I edit Product 3 from position 3 to position 1, it won't adjust the other ...
ruevaughn's user avatar
  • 1,319
0 votes
1 answer
173 views

Looping through an array of objects and find first item with position number

Ok, so I'm not sure how to word this but: I have an array of albums, and each album has many images. I'm using the ruby gem acts_as_list to allow users sort the images in the albums, and thus each ...
rugbert's user avatar
  • 12.3k
4 votes
0 answers
688 views

Using acts_as_list and nested_form together in Rails 3.1.rc4 app

I originally posted this up as an issue on nested_form but not had any insight. The detail is here: https://github.com/ryanb/nested_form/issues/66 Recap: I have a slightly unusual requirement that ...
Paul Robinson's user avatar
1 vote
2 answers
1k views

Rails 3 / RVM - Acts_as_list compiled locally - Why Can't Ruby See This Gem?

I cannot figure out why rails/ruby cannot see this gem, despite each telling me that the gem is visible. I compiled this gem locally from a github branch since the main version seems to be broken in ...
pendevere's user avatar
  • 637
5 votes
3 answers
6k views

has any one gotten acts_as_list to work on rails 3?

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....
Anthony H's user avatar
  • 347