Displaying 20 results from an estimated 1000 matches similar to: "undefined local variable or method "acts_as_list"?"
2008 Feb 14
4
How do I access this parameter?
Hi,
I have a form for creating users ...
<% form_tag ''userconfirm'' do -%>
<!-- more code -->
<p><label for="user_login">Username</label><br/>
<%= text_field ''user'', ''login'' %></p>
<p><label for="user_password">Password</label><br/>
<%=
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
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
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
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
2008 Feb 27
7
older version of rails -- Unknown action error
Hi,
I''m using Rails 1.2.3 (constraint of the hosting company). I''m
getting this error
Unknown action
No action responded to subscriber
upon visiting http://mydomain.com/super_admin/subscriber/search
I have these files:
app/controllers/super_admin_controller.rb
app/controllers/super_admin/subscriber_controller.rb
app/views/super_admin/subscriber/search.rhtml
and below is my
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
2006 Sep 10
5
why isn't :order working in acts_as_list
Ok, I''m sure this has to be something stupid that I''m doing (or not
doing), but I can''t seem to get things to order by the specified column.
class List < ActiveRecord::Base
has_many :list_items, :order => "orderby"
The error I get back when trying to save the link is:
Unknown column ''position'' in ''order clause'':
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 Jan 15
2
acts_as_tree & acts_as_list for a single model?
Hi,
If I have a db table
categories
- id
- name
- parent_id
- position
is it alright to have the Category model act_as_tree and for each
level act_as_list?
class Category < ActiveRecord::Base
acts_as_tree :order => :position
acts_as_list :scope => :parent_id
end
Thanks,
Peter
2007 Nov 14
1
has_many_polymorphs and acts_as_list ?
First, BRAVO for this wonderful plugin: has_many_polymorphs ! Now my
problem:
4 models : Collection, Page, Fragment, Belonging (which is the join
table):
1 class Collection <
ActiveRecord::Base
2 has_many_polymorphs :elements,
3 :through => :belongings,
4 :from => [:pages, :fragments, :collections],
5 :as => :collector,
6 :parent_order =>
2010 Sep 09
4
acts_as_list query
When moving an item around within the list, shouldn''t EVERY item have
its optimisitc locking field updated? Currently, only the item that is
moved has its optimisitc locking field updated, but every item has its
position field changed so surely they too should have their optimistic
locking fields updated?
I''ve created a drag and drop interface on a list of items that allows
for