Skip to main content

Questions tagged [acts-as-list]

ActsAsList is a Rails plugin that provides list abilities to an ActiveRecord model

acts-as-list
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
6 votes
3 answers
3k views

Using acts_as_list on multiple columns

I have a possibly unique case where I need a model to have two differing orders depending on the model it is joined to. Example as follows: class Book acts_as_list :column => :genre, :scope =&...
Matthew O'Riordan's user avatar
3 votes
2 answers
4k views

Should acts_as_list automatically reorder items when a resource is updated with update_attributes?

I'm using the acts_as_list plugin with rails 3.1 and whenever I add or remove a resource existing positions are ordered and updated fine. However, when updating the position of a resource with ...
David's user avatar
  • 33
2 votes
2 answers
4k views

How to sort deeply nested collections with ActiveRecord?

I'm building a music-managing Rails app, and my app's users will be able to make ordered playlists of albums, and each album will have an ordered list of songs. In essence, this will look like: ...
trisignia's user avatar
  • 1,173
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
3 votes
1 answer
4k views

Rails 3.1: undefined sortable_element using acts_as_list gem - how to fix?

How do I get sortable_element from the acts_as_list gem to work nice with Rails 3.1? I think it's because jquery is used instead of prototype so I lose that helper method? Is this right? In which ...
Richard Jordan's user avatar
8 votes
1 answer
1k views

Rails - acts_as_list with multiple Models

I've managed to use act_as_list with my Models (it was quite easy) one by one, but now i have a problem. In my app there are 3 models: Facility, Service and Activity. I need to use acts_as_list on ...
Abramodj's user avatar
  • 5,859
1 vote
1 answer
1k views

acts_as_list - Not dragging!

I followed several tutorial to make this work, but I can't get draggable items. Here's what i did: added gem 'acts_as_list' in my GemFile and did a bundle install added <%= javascript_include_tag ...
Abramodj's user avatar
  • 5,859
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
0 votes
1 answer
457 views

Is Acts_as_list's 'last?' method not working as intended or am i making a mistake?

So I am using acts_as_list in my current rails project. And I run into the following odd behavior: When i remove an item from the list (item.remove_from_list) it correctly sets the position column of ...
ErwinM's user avatar
  • 5,121
0 votes
1 answer
613 views

Sorting Items in Rails Controller Method

I'm having an issue writing a controller action that takes Post ids passed as a parameter and sorts them into a specific order before publishing them. The Posts have a position attribute (I'm using ...
btw's user avatar
  • 7,116
0 votes
1 answer
373 views

acts_as_list postgres error on heroku

We are using has_many_polymorphs along with acts_as_list. Everything works fine locally, but on heroku, we get an error everytime a couple of acts_as_list methods are called. Namely those that update ...
Jarrett's user avatar
  • 113
11 votes
4 answers
3k views

acts_as_list with has_and_belongs_to_many relationship

I've found an old plugin called acts_as_habtm_list - but it's for Rails 1.0.0. Is this functionality built in acts_as_list now? I can't seem to find any information on it. Basically, I have an ...
mculp's user avatar
  • 2,667

15 30 50 per page
1 2 3 4
5