Browse the Ruby on Rails Community.

You are here: Forums Ask a Rails expert i want create web page which c...

Replytotopic

i want create web page which contain forums

Posted in Forums : Ask a Rails expert

 
Profile

Authority 12
Posting Rating 0
Sign in to rate this post

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

 
Profile

Authority 12
Posting Rating 0
Sign in to rate this post

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.

 
Profile

Authority 12
Posting Rating 0
Sign in to rate this post

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

 
664297762

Authority 50
Posting Rating 95
Sign in to rate this post

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

 
Profile

Authority 12
Posting Rating 0
Sign in to rate this 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

 
Profile

Authority 12
Posting Rating 0
Sign in to rate this post

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

 
664297762

Authority 50
Posting Rating 95
Sign in to rate this post

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

 
Profile

Authority 12
Posting Rating 0
Sign in to rate this 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

Replytotopic

Other Recent Topics

Ask a Rails expert : nested application ApplicationController get called intead of children::ApplicationController

Ask a Rails expert : Best way to structure a database for a large/static dataset

Ask a Rails expert : Ruby Developer (ROR) - Scottish based (Remote working from within the UK)

Ask a Rails expert : Above Ground Pool Supplies

Ask a Rails expert : How to get url params in observer or model in Rails 3.1

Ask a Rails expert : What can persuade you to hire Junior Ruby devs with significant PHP experience?

Ask a Rails expert : What industry value does the Ruby or Rails Certification currently have?

Ask a Rails expert : Louis Vuitton Damier Azur Canvas specially sale ( www.salecheaplouisvuitton.com )

Ask a Rails expert : ·How to check errors/puts statements from ruby files which are under cronob

Ask a Rails expert : Louis Vuitton cheap Soft Sided Luggagespecial offer( www.salecheaplouisvuitton.com )

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel