similar to: Sortables, acts_as_list and performance

Displaying 20 results from an estimated 9000 matches similar to: "Sortables, acts_as_list and performance"

2005 Jul 07
2
0.13 ajax sortable lists and acts_as_list
I''m trying to figure out a good way to get acts_as_list and the new sortable lists to play nicely together, but they don''t seem like they''re designed to mesh well. The ajax sortable lists post a complete ordered list of ids back to the server after every change, but acts_as_list is designed to deal with diff-like changes, rather than reordering the whole list from
2006 Apr 01
3
acts_as_list with scope : position update problem?
Hello, I''ve tried to set up a class with acts_as_list with a scope argument that restricts a list to records with the same foreign key. For example : database : CREATE TABLE `families` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '''', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; INSERT INTO
2007 May 09
0
Scriptaculous Sortables: dragging between sortables and reordering them by javascript?
Hello, I wanted to drag elements from one sortable to another - not a problem. the hard thing is that i want to call a JS function to reorder the elements by certain criterias (ranking f.e.). So the two involved sortables are firering two onUpdate event. When I am changing the order of the LI-elements of the first Sortable (by removing them and adding them again), the second onUpdate event will
2006 Jun 27
2
how to use scope with acts_as_list
i am working on a task management system for the company i work for. i just got the rails cookbook and am trying to use the section on creating a drag and drop sortable list. the tricky part is that my Task model references the User model in two different spots. i have one field for the creator of the task and another for the assignee. so in my Task model i have the following code: class
2007 May 01
0
Small Scriptaculous Sortables Jitter
Hey all I have a project that i''m working on where I''m making extensive use of sortables. I''ve noticed that when my sortable item height is approximately less than 30 pixels, when I try to reorder the sortable it jitters between 2 positions and causes a nasty effect. I expect it''s to do with the tolerance percentages and pixels- when you start to get that
2007 May 22
3
can I use acts_as_list with a has_many :through association
I''d like to be able to use a has_many :through association and treat the associations as a list but I''m getting this error when I try an use an acts_as_list method: NoMethodError: undefined method `move_to_bottom'' I''m using edge rails r6786. Here are my domain rules: Activities are things students can do. Units consists of a sequenced list of
2005 Apr 20
4
acts_as_list and single table inheritance
in a single table inheritance model, rails will automatically set the scope for acts_as_list to the ''type'' field as well as any other scope conditions we provide. Is there a way to disable this? i want to use STI but I want acts_as_list to disregard the class type when getting/setting positions. thanks alan
2006 Apr 11
1
acts_as ... hourly_list?
Hi, My question is a bit of wonder and a bit of enlightment. I have two models, Channel and ChannelItem, the second is a list of Events, ordered by position (because I''m using acts_as_list). Later I use a method in Channel to recalculate the hour when that show come online, based on the duration of it and doing math based on the previous one duration and start time, starting from
2009 Jan 04
3
undefined local variable or method `acts_as_list'
So I seem to be having an issue with trying to install acts_as_list in rails 2.2.2? I have downloaded the files from: http://github.com/rails/acts_as_list/tree/master I have put the files in the vendor/plugins folder the files are as follows: vendor/plugins/acts_as_list/init.rb vendor/plugins/acts_as_list/lib/active_record/acts/list.rb vendor/plugins/acts_as_list/test/list_test.rb
2009 Jan 05
3
Plugin not found: ["acts_as_list"]
I am trying to install acts_as_list in a rails 2.2.2 project but when I try the following: ruby script/plugin install acts_as_list I get: Plugin not found: ["acts_as_list"] I had to download the acts_as_list plugin from the github because it isn''t included in Rails 2.2.2. The files are in my vendor/plugins/acts_as_list folder so I have: lib/active_record/acts/list.rb
2009 May 09
0
acts_as_list not working despite being installed
I just installed a newer version of Ubuntu and so with it, rails 2.3.2. Now I can''t get acts_as_list working. I get the error: undefined method `acts_as_list'' for Child(Table doesn''t exist):Class But I have already run > ruby script/plugin install acts_as_list + ./README + ./init.rb + ./lib/active_record/acts/list.rb + ./test/list_test.rb I started a new program
2006 Sep 03
7
using polymorphic associations with acts_as_list
This is what I have class Photo < ActiveRecord::Base belongs_to :image, :polymorphic => true acts_as_list :scope => image end class Place < ActiveRecord::Base has_many :photos, :as => :image end class Child < ActiveRecord::Base has_many :photos, :as => :image end I want to be able to reorder the images. What I need is for the position of the photos to be set
2006 May 26
6
Help needed with acts_as_list
Hi ! There must be something I don''t understand clearly in acts_as_list I have a list of gallery entries (images + text), model is GalleryEntry. I have a field in_exhibition (boolean) I want the list to be sorted with a scope on in_exhibition : from 1 to N for every record having in_exhibition = false and 1 to N for every record having in_exhibition = true When I use acts_as_list
2007 Jan 25
1
acts_as_tree with acts_as_list
Hello all, I''m having trouble using acts_as_list with acts_as_tree to order the "children". I''ve found a few old posts on the web that seem to indicate that this once worked. class Whatever < ActiveRecord::Base acts_as_tree :order => :position acts_as_list :scope => :parent_id Although the ''position'' field is being populated, it appears
2006 Jun 11
0
Reaching through a belongs_to for acts_as_list scope?
I''m running into a situation where I''d like to provide the list scope for an acts_as_list model from one step removed. In minimalistic form (with several other associations removed from each level). class MainEntity < AcrtiveRecord::Base has_many :containers end class Container < ActiveRecord::Base has_many :elements belongs_to :main_entity end class
2006 Apr 20
0
acts_as_list not CASCADE''ing in singular n-tier model structure
[using RAILs 1.1.2] Has anyone else seen issues where multiple tiered "acts_as_list" models do not CASCADE delete correctly? For instance, I have 4 models, the first 3 in the hierarchy have the appropriate "have_many" declarations with "exclusively_dependent => true". The last the models have the appropriate "acts_as_list" with the correct scope
2009 Feb 12
0
acts_as_list sort by multiple items
I have a Person model and I''m using acts_as_list so I can have drag/drop positioning of people. The only thing is, I want to be able to differentiate between male and female, ie. sort males separately from females. It seems completely useless to have two separate models since all the other attributes of a person are the same (name, address etc) Does acts_as_list allow ordering by, say,
2006 Apr 12
1
acts_as_list problem with records coming in and out
I have the model that acts as list acts_as_list :scope => ''featured=1'' As you can see, I only need to order the records that are featured. However, from time to time I switch some featured items off and mark others as featured. When this is done, I start getting dublicate numbers on the list and ordering starts getting problem... What would be the good approach to
2007 Mar 28
1
acts_as_list nested scope
Here''s what I''m trying to do: class Model < AR::Base acts_as_list :scope => [:key_one_id, :key_two_id, :key_three_id] end with the idea being that there are these three references from this table (one of them being optional) that define the list. I don''t think acts as nested set works in this situation because I''m still just dealing with a single list
2006 Jul 31
0
acts_as_list with single table inheritance
I have a question about where to decorate my classes with acts_as_list. I am using single table inheritance and i have a base class LookupItem. There are 5 child classes: Priority, Probability, RiskRating, Status, and RiskManagementItem. Each of these 5 items needs to act as a list. Should I use acts_as_list on each child class or should it go on the parent LookupItem class? I''m