hello , i m new in ror i want make new forums site, for that i create following controller 1 form 2 user 3 comment
that any user comment on forums...........
plz help for that
You can use a plugin for that.. I have integrated bagpipes plugin to provide the forum functionality in my application.
You can browse the plugin at "http://github.com/bscofield/bagpipes". It is self explanatory.
Hi chevZ.. Yes Of-course you can do this forum functionality by both way..
If you want do without plugin.. Then probably should have to create its rough architecture.
Here I consider 3 main needful entities for your site is as follows:
1- User 2 - Post 3- Comment
Give there association like:
1- User User has many Posts User has many Comments
2 - Post Post Belongs to user Post Has Many Comments
3- Comments Comments Belongs to post Comments Belongs to user
But its better to use existing plugins / gems always in you projects to reduce cost, efforts as well as developement time. If you are new in rails then I would say, Yes you are going with good track!
let me know is this solution of your query..
I hope above structure will help you to create project track..!
Good Luck ;)
thank you ganesh............
i have one problem . class CommentsController < ApplicationController def index
end def new
end def create
@comment = Comment.new(params[:comment]) if @comment.save flash[:notice]="reply sucessfully posted" redirect_to form_url(@form.id) else redirect_to #if not save then what should do???????? end
if comment is save i want go that title where i reply
and it should show the reply at time
Use http://pastie.org/ web-site to paste your source code and then just paste here that your content link of the pastie.org.
So that it will be helpful to refer for other people also.