Displaying 20 results from an estimated 300 matches similar to: "acts_as_nested_set and acts_as_threaded"
2006 Mar 15
5
acts_as_threaded - help ???
Hi, has anyone successfully used the acts_as_threaded plugin with
postgresql?
I''m using rails 1.0 and ruby 1.8.4 on linux.
Following the screencast on
http://www.railtie.net/articles/2006/02/05/rails-acts_as_threaded-plugin ,
I got to where we''re ready to create our first post, having made the
changes to controllers/posts_controller.rb, views/posts/_form.rhtml,
2006 Jun 20
2
Converting from acts_as_tree to acts_as_nested_set
I''m currently using acts_as_tree to display threaded Comments on my
forums-like site. It''s waaay too slow to display a page with 1,000
comments, as it''s issuing a TON of selects.
I''m pretty sure I want to convert to the nested set model, using
acts_as_nested_set or acts_as_threaded. This should give me the
performance I''m looking for.
The problem,
2006 Feb 06
3
acts_as_threaded plugin
This plugin is related to the acts_as_nested_set functionality but differs
in that it allows multiple roots to exist within your database.
The other benefit, is that when adding a child, it doesn''t perform a full
table update to rebuild the tree, each child insertion only affects the tree
that it is placed in.
It even comes with my first screencast to show how you can build an old
2006 Feb 06
2
acts_as_nested_set
Where can I see the API acts_as_nested_set constructs? I''ve read its
page in api.rubyonrails.com but I don''t see how to manage the tree
from there.
-- fxn
2007 Jan 10
0
SQLite3::CantOpenException
Hi,
When I try to run a controller that connects to my project''s sqlite
database, I get the following exception:
SQLite3::CantOpenException in PostController#index
could not open database
config/database.yml correctly points to my database, like so:
development:
adapter: sqlite3
database: db/dev.db
I''ve had Rails projects working with sqlite3 before (recently), but
2007 Jun 04
2
access to acts_as_threaded
Hi,
I have trouble accessing the acts_as_threaded plugin at
http://railtie.net
looks like the site is down.
Does someone have a copy? or knows an alternative repository for the
plugin?
please you can zip it to to this address georgkam[at]gmail[dot]com
Thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2006 Apr 07
2
Paginate single items
Hi,
In my blog i display a post. I want to display a link tot he previous
post if there is 1 and a link tot he next post if there is one.
So i have in my controller
def post
@post = Post.find(params[:id])
@post_pages, @posts = paginate :posts, :per_page => 1
render(:layout => false)
end
And the following code in post.rhtml
<% if @post_pages.current.next %>
<%=
2006 Jun 22
0
acts_as_threaded with pagination
Does anyone have the magic sql to get pagination working with
acts_as_threaded?
Return like:
1 - parent
1.1 - response
1.1.1 - response to response
1.2 - response
2 - parent
2.1 - response
etc... up to the first 20 or so.
It seems easy to get from a parent to all children, but to say get the first
20 parents and children is really hard for me to get my head around. I can
imagine getting
2006 Jun 15
1
Multiple :conditions?
How do I add multiple conditions to a paginated list? I have:
@post_pages, @posts = paginate(:posts,
:per_page => 10,
:conditions => [ ''(title) OR (body)
LIKE ?'', ''%'' + params[:query] + ''%''],
:order =>
2006 May 14
6
Controller Inheritance
Is there any known problem in inheriting a Controller from another
controller (that is to say having an Admin::PostController <
PostController, with PostController < ApplicationController)?
It is something I haven''t seen done in tutorials or books, however in my
opinion (and as far as I can see from my tests) it should work.
2006 Jun 13
9
Find DB items by "title"
I''m having trouble finding then displaying all items in my "posts" table
that match a certain search string.
I have a from field:
<%= start_form_tag :action=> "search" %>
<div title="Search" id="searchform" class="form">
<h3>Search</h3>
<%= error_messages_for ''post''
2006 Jul 18
1
Bad values for acts_as_nested_set?
I moved from acts_as_tree to acts_as_nested_set because I need the
all_children method.
I''ve seen an alternative way to add this method to acts_as_tree here:
http://www.chuckvose.com/articles/2006/05/24/recursive-children
But I''d prefer to use the more efficient way of acts_as_nested_set (and
not to have to revert to my old code).
Anyway, here''s my issue: if I
2006 May 10
1
acts_as_nested_set does not work (in my case).
Hello,
I am using acts_as_nested_set. My problem is that the columns "lft" and
"rgt" get the value 0 if I create a new entity. If I delete an entity I
get negative values (-1, -2, -3) - but for all entities. Is there
anything missing? Is there any example for "acts_as_nested_set" in the
web?
--
Posted via http://www.ruby-forum.com/.
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/.
2009 Feb 17
8
Converting Acts_As_Tree to Acts_As_Nested_Set
Hello,
I have a tree structure that needs to be converted into a nested set.
A great deal of work has already been done on the tree items, so
maintaining the integrity of the id''s is mandatory. However I need
the ability to access entire branches of the tree, which is what
Nested set does. Does anyone have any suggestions on how to
efficiently transfer the tree to the nested set and
2006 May 31
1
Help enhancing acts_as_nested_set
I''m trying to enhance acts_as_nested_set. Well actually I already have,
but I''ve done a hack up job of it. I would like to contribute these
enhancements back, but I need a little help.
I''m a complete newbie to this stuff. The only thing I new before coming
into this project was vanilla HTML. So over the course of two weeks I''ve
picked up Ruby, Rails, MySQL,
2006 Jun 14
4
Using now() to determine what should be displayed
I''m trying to create a paginated list that will take note of the
"end_date" field in my table. This is what I have:
@post_pages, @posts = paginate(:posts, :per_page => 10, :order_by =>
''end_date'')
in the controller. And for the view:
<h1>Posts ending soon</h1>
<ul><% for post in @posts do %>
<strong>Post Title:
2006 Feb 25
3
Enumerating over a Tree by Depth
I have a model using acts_as_tree which is working fine.
Being new to Ruby I''m don''t know what enumerator is best to use for
traversing a tree by depth. I can write one, but before I do I wanted
to know if there is there an enumerator for traversing trees available
that the community recommends?
Thank you,
Jose
--
Posted via http://www.ruby-forum.com/.
2006 Mar 03
5
Message Board?
I''m interested in working on a message board application that uses ruby on
rails.
I''d like to see something end up similar to vBullieten, but with more of a
37signals type of less-is-more philosophy... mostly meaning less need for
preferences and settings and configurations.
I''ve checked rubyforge, and it looks like there are various forum apps
uploaded there, some
2006 Apr 22
3
rjs woes, any hints?
I''ve pared my rjs experiment down to what seems a bare minimum. When I click
on my link_to_remote, the rjs executes, returns the correct javascript to
the browser, but it doesn''t update the div I''ve specified. What appears to
be coming back from the controller is:
Element.update("my_form", "hello, rjs");
I''m tearing my hair out.