An example form would be immensely helpful. It would be a trivial matter for experts, but incredibly helpful and time-saving for newcomers. And for a good % of the time, a deciding factor for newcomers to use this gem instead of seeking other sources.
The current code for controllers, do they all go in the "Articles" controller? Which scope or file do they go into? This kind of information of often overlooked by experts, professors, and people who have been doing things for a long time because it' intimate knowledge to them, and often becomes a blind-spot in terms of teaching.
Some examples of ambiguity and confusion:
- The following wording makes it seem like you need to write this code in the model. Easily un-confused by labeling the file name that this code should go in, (i.e. articles_controller.rb or should it be comments_controller.rb I still can't tell.)?
Add a comment to a model instance, for example an Article:
@article = Article.find(params[:id])
@user_who_commented = @current_user
@comment = Comment.build_from( @article, @user_who_commented.id, "Hey guys this is my comment!" )
- where does this goo?
To make a newly created comment into a child/reply of another comment:
@comment.move_to_child_of(the_desired_parent_comment)
Other issues:
How to you properly use the "lft" and "rgt" integer columns?
The generator command doesn't produce a comments controller. Do we need a comments controller though? If not, how do you create comments? This is where an example form would help. Especially using it with ajax, which is most likely what everyone wants to do with it.
The model is under app/models/ for rails, not lib/
In lib/comment.rb uncomment the line acts_as_votable.
An example form would be immensely helpful. It would be a trivial matter for experts, but incredibly helpful and time-saving for newcomers. And for a good % of the time, a deciding factor for newcomers to use this gem instead of seeking other sources.
The current code for controllers, do they all go in the "Articles" controller? Which scope or file do they go into? This kind of information of often overlooked by experts, professors, and people who have been doing things for a long time because it' intimate knowledge to them, and often becomes a blind-spot in terms of teaching.
Some examples of ambiguity and confusion:
Other issues:
How to you properly use the "lft" and "rgt" integer columns?
The generator command doesn't produce a comments controller. Do we need a comments controller though? If not, how do you create comments? This is where an example form would help. Especially using it with ajax, which is most likely what everyone wants to do with it.
The model is under app/models/ for rails, not lib/