Displaying 20 results from an estimated 12000 matches similar to: "why isn't :order working in acts_as_list"
2006 Jul 02
6
remote form w/ evalScripts:true
Hello. I want to select an item from a select list and have that
result in an ajax call that updates two sections on the page. Here is
the code in the controller
def create
...
render :update do |page|
page.replace_html ''list_items'', :partial => ''lists/list_items''
page.replace_html ''add_item'', :partial =>
2006 Jul 02
10
Use Rails or PHP?
I''m new to RoR and have used PHP. I want to develop a personal
organizer that allows me to add lists (tables) and search them. The
ActiveRecord concept seems to allow me to set up something that works
with an existing table, but I want the ability to add tables without
programming. I know how to do this in PHP and I can put the SQL into
queries in RoR, but does ActiveRecord let
2008 Feb 22
7
undefined local variable or method "acts_as_list"?
Hi, I''m getting the error below, and I''m not sure where to find
"acts_as_list" ...
NameError in SpecialsController#printer
undefined local variable or method `acts_as_list'' for #<Class:
0xb7a46994>
RAILS_ROOT: /usr/local/apache2/htdocs/dps
Application Trace | Framework Trace | Full Trace
vendor/plugins/trunk/lib/scope_out.rb:70:in
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 Jul 02
7
Params Merge and URL sorting/pagination
Hi all,
Here''s my general setup on the specific template I''m having issues with:
will_paginate for pagination
custom methods for sorting
1-form for team search
1-form for search by date
When searching for a team for instance, the url returned will be:
/rushing_offenses?search=Florida
When searching by date, the url returned will be:
/rushing_offenses?compiled_on=2009-07-02
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
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 Dec 15
3
check_box not being checked
I''m new to RoR and I''m having a little problem that I can''t solve.
My model is simple. I have Lists and ListItems.
I have a view that loops through all the list items, and I put the
HTML for the each list item row in a partial called _list_item.rhtml.
This is the view, called show.rhtml
<ul>
<%= render(:partial => "list_item", :collection =>
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
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 Nov 25
2
acts_as_list with 2 fields in the scope
Hi Railers,
I''ve got a Categories table.
I want it to act as a list within the scope of the parent_id AND the
site_id.
Categories table :
id
label
site_id
parent_id
So, in my Category class, I have :
acts_as_list :scope => ''site_id = #{site_id} AND parent_id = #
{parent_id}''
The problem is that when I try to move_up a Category with a parent_id
that is null,
2010 Oct 13
2
acts_as_list issue in single table inheritence
Hello Rails experts,
Need your help in following issue with the acts_as_list and single
table inheritence
Code details :
http://pastie.org/1214846
Hello Rails experts,
Need your help in following issue with the acts_as_list and single
table inheritence
Code details :
http://pastie.org/1214846
But here I need create those entries with the scope on Relater only and
not on RelaterFeed or
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
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
2009 Aug 19
10
acts_as_list / acts_as_tree / acts_as_nested_set - which one
I am creating forum application which needs usage of acts_as_list or
acts_as_tree or acts_as_nested_set.
I am unable to decide among these. please could some one recommend from
their experience?
--
Posted via http://www.ruby-forum.com/.
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 May 21
3
acts_as_list scope and polymorphic association.
this is my model:
class Person < ActiveRecord::Base
has_many :phones, :as => :callable, :order => :position
end
class Phone < ActiveRecord::Base
belongs_to :callable, :polymorphic => true
acts_as_list :scope => :callable_id
end
how can i add the callable_type to the scope.
how can i say the scope is the {:callable_id,:callable_type} couple?
is it even possible?
thanks
2010 Mar 10
2
ordering columns in a data frame
Dear R users,
I have the following data frame:
PROCHI date_admission
2 CAO0000713 1999-12-11
4 CAO0000713 1999-10-25
21 CAO0001743 1989-05-04
25 CAO0001743 1996-09-12
26 CAO0001743 1989-05-17
27 CAO0001743 1987-09-17
28 CAO0001743 1987-09-19
29 CAO0001743 1988-01-27
36 CAO0001747 2004-03-21
38 CAO0001747 2004-03-22
39
2006 Mar 22
10
Need for multiple acts_as_list
I have a model "Childmodel" that belongs_to two other models "Parent1"
and "Parent2". "Parent1" "has_many :childmodels, :order => :positionp1"
and "Parent2" "has_many :childmodels, :order => :positionp2". i.e. The
child is independently positioned within each of its parents.
This works fine and gets me the useful
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