It would also be create if

def create
@comment = @commentable.comments.build(params[:comment])

Passed along the current_user as I added user_id to the comments
table :)

On Sep 21, 8:55 pm, nobosh <[email protected]> wrote:
> 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 <[email protected]> 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 <[email protected]> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to