Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
i want create web page which contain forums
8 Posts
i want create web page which contain forums

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

hello..

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.

hey can this done by withot plugin?????????

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 ;)

-Ganesh

Person
Jruby, Ruby, Rails Programmer
Sign In To Rate Post

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

end end

if comment is save i want go that title where i reply

and it should show the reply at time

should i mail this to u r id??????????

Hi,

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.

-Ganesh

Person
Jruby, Ruby, Rails Programmer
Sign In To Rate Post

Get All the News From the DB Put render :action => 'index'

otherwise

redirect_to '/index'

in index Method u have to get the Forum News Details

8 Posts
Login to add your message