Displaying 20 results from an estimated 2000 matches similar to: "Having difficulty with threaded comments, using acts_as_tree"
2010 Sep 17
25
Trying to look up comment through an ID, but failing
I am trying to allow users to reply through comments by allowing users
to click a reply link next to the parent comment. It will send in a
parameter to the ''new'' comment view, like so:
| <%= link_to "Reply", new_comment_path(:in_reply_to => comment.id) %>
The form will use the :in_reply_to parameter in order to save that id as
the parent id, like so:
2010 Sep 21
25
Working in install acts_as_commentable, On create, error: "unknown attribute: book_id"
Hello, I''m working to install the acts_as_commentable plugin on my
Rails 3 app.
After adding "acts_as_commentable" to my book model, I then added a
comment form on my book show view:
<% form_for(@comment) do|f| %>
<%= f.hidden_field :book_id %>
<%= f.label :comment %><br />
<%= f.text_area :comment %>
<%= f.submit "Post
2010 Sep 09
17
formtastic issue
Hello,
I will try to explain it step by step :-)
I just created a new rails 3 app, then I created a new controller...
rails generate controller admin::users
I didn''t forget to add the resources in the routes.rb file like this.
namespace :admin do
resources :users
end
Now I try to use formtastic to create the form but I get erorr that my
users_path doesn''t exist?
2013 Feb 28
2
Create polymorphic resources
Hi
I have created a polymorphic association for comments since I need
commenting functionality on several models. The issue is that when I create
the comment in my Commets#create action, I really don''t know what type the
parent is of.
So, let''s say I have Foo, Bar and Comment. Comment have this:
belongs_to :commentable, polymorphic: true
And Foo and Bar both have:
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/.
2010 May 12
3
Best Gem For Threaded Comment Storage?
Dear List,
Given that I am developing a rails 2.3.5 site,
When it comes to storing threaded comments in a blog or forum,
Then which plugin/gem should be considered "State of the Art"?
I''m starting with these URLs:
http://github.com/rails/acts_as_tree
http://github.com/rails/acts_as_nested_set
http://github.com/collectiveidea/awesome_nested_set
2010 Feb 09
3
acts_as_tree question
Hi,
I''m trying to implement a very simple acts_as_tree search in my index
html.
I am able to show the parents, with no issue, but the children will
not show.
I have something like this for the parent, which displays fine:
<% for group in Group.roots %>
<td>
<tr>
<a href="#" onclick="Effect.BlindDown(''show_<%=
2010 Sep 22
8
ActiveScaffold and partials
I was thinking of doing partials as I did in the simple Rails
application I worked on today.
But, since I''m using ActiveScaffold, I didn''t find any *.html.erb in the
views folder of the Rails application that I need to make my partials!
How can I work with partials in ActiveScaffold?
Thanks.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you
2010 Sep 15
5
Hide an image in show.html.erb
I have the following "show.html.erb" script, and I get as an output TWO
images since I use a method to draw an image.
How can I HIDE the RESOURCE image?
Thanks.
Here is the script:
<canvas id="line" height="512" width="512">
</canvas>
<p id="notice"><%= notice %></p>
<p>
<b> Name </b>
<%=
2010 Sep 13
13
what I've missed in routes.rb?
In routes.rb I''ve put:
resources :sessions
controller is:
class SessionsController < ApplicationController
def destroy
session[:id] = nil
session.delete(:casfilteruser)
CASClient::Frameworks::Rails::Filter.logout(self)
end
end
In application.html.erb I have:
<%= link_to ''Logout'', session_path(session[:cas_user]), :method => :delete %>
I
2010 Dec 07
10
Advice on data design idea
I''m about to embark on a project and am seeking advice on my approach.
I have an automotive site that needs to have shared categories. I''ve
checked out different nested set, ancestral, acts_as_tree, acyclic
plugins but feel they don''t exactly fit.
So I am about to roll my own simple solution. Any feedback as to
whether this looks good is appreciated.
Essentially I
2010 Sep 27
5
RoR Tutorial : clear password field
Learning Rails following the Rails Tutorial book I have the following
question.
In chapter 8 at the Exercises part they talk about clearing the
password field.
I tried several things to do this, but till now didn''t find the
solution.
Anyone has a tip how to do this?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Nov 20
1
sem package subscript out of bounds error
I'm having the most curious error while using the sem package. For
the model I'm working with, I keep getting the following error:
Error in J[cbind(1:n, observed)] <- 1 : subscript out of bounds
I''ve used debug=TRUE with sem, and there don't appear to be any
problems with model - there are no latent variables in this model.
The variables in the covariance matrix
2010 Sep 12
11
Rails Commenting, Plugins?
Hello,
I''m looking to add comments to records in my app like Books. So a user
can view a Book and then comment on it...
As a newbie, is this something that I should build from scratch, or
are there any popular Commenting Plug-ins, (Ajax implemented) that
might be worth utilizing?
Thanks
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2010 Sep 11
4
Can't install plugins on rails 3.0
Just upgraded one of my apps to Rails 3.0 and I cannot install
plugins. I either get "Plugin not found", or an empty folder.
When I run
rails plugin --verbose install http://github.com/jslag/us-state-select-plugin.git
I get this response:
Plugins will be installed using http
git init
git pull --depth 1 http://github.com/jslag/us-state-select-plugin.git
But all I get is an empty
2007 Jul 19
3
Merb::Controller#url Usage
I have a question about the usage of Merb::Controller#url. When I
have nested resources, requesting the new action works differently
than I expected. I was wondering what the intended usage is.
For example:
Say I have
r.resources :articles do |article|
article.resources :article_attachments
end
irb(main):002:0> show_routes
[:articles, "/articles"]
[:article_attachments,
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 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id''
I have a Model class like the following:
class Article < ActiveRecord::Base
set_primary_key "ARTICLE_ID"
end
however, using a link_to like the following (modified scaffolding),
the link has no id value:
<% for article in @articles %>
<tr>
<% for column in
2010 Mar 27
2
Shorter Rails 3 routes
Hi,
I have a small blog application, and I would like to shorten its routes.
Here they are:
Blog::Application.routes.draw do
resources :categories do
resources :articles do
resources :comments
end
end
A rake routes command produce the following lines:
GET
/categories/:category_id/articles/:article_id/comments(.:format)
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have
article_groups as a jointable. Now I want to select every article who
is a member of group with id ''1'' and id ''2''. Whats best way to get
that?
Extract from schemas:
CREATE TABLE articles (
id int auto_increment,
ingress text NOT NULL,
story_text longtext,
constraint fk_items_users