[Rails] Re: Working in install acts_as_commentable, On create, error: "unknown attribute: book_id"
To get your code working in my app I needed to:
@comments = @article.comments.roots.order("created_at
DESC").paginate( :page => params[:page]||1,:per_page => 5)
REMOVE roots in books_controller.rb:
@comments = @article.comments.order("created_at DESC").paginate( :page
=> params[:page]||1,:per_page => 5)
And in comment.rb:
COMMENT OUT #acts_as_nested_set
Otherwise I get the error on the books show page: "uninitialized
constant Book::Comment"
Is there a GEM that needs to be installed? Or maybe this isn't
supported for Rails 3?
On Sep 21, 7:57 pm, nobosh <bhellm...@gmail.com> wrote:
> Very nice thanks, I'm trying it out now.
>
> don't really have the need for pagination but it's helpful as a
> learning tool/tutorial of sorts...
>
> regarding a feature to add, I can actually think of one very common
> feature, as seen on Facebook. If you have over 3 comments, to only
> show the latest 2 comments, and then have a ajax link "View all X
> comments" which when clicked loads/injects the remaining comments into
> the comment list. That's a pretty important one! A less important one,
> is being able to LIKE a comment.
>
> Sound interesting?
>
> On Sep 21, 6:16 pm, radhames brito <rbri...@gmail.com> wrote:
>
>
>
> > check it out i cant think of any more features to add. See if you can think
> > of something =D
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home