Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Rails: acts_as_list (using acts_as_tree)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Rainer Jung, post: 4514680"] Hello there! I have a small problem. I am building an gallery-application with Rails. The model for the gallery is using "acts_as_tree" and "has_many :images". The image model "belongs_to :gallery" and "acts_as_list :scope => :gallery_id". I intended to use acts_as_list to be able to find all images in the same gallery-scope to simply paginate the images with ":per_page => 1". But now if i have the "@image", and try to get all other images, i would try to do "@image.parent.children". With .parent i would get the Gallery-instance, but if i use .children on that Gallery-instance, i probably would get the other Gallery-instances, which are in the subtree of the image. Has someone a nice idea how to easily paginate the images from one gallery? Regards, Rainer [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Rails: acts_as_list (using acts_as_tree)
Top