Help with creating a dropdown and other elements for a FAQ page with Ruby on Rails.

Posted by AJ on Stack Overflow See other posts from Stack Overflow or by AJ
Published on 2010-05-11T18:26:47Z Indexed on 2010/05/12 3:04 UTC
Read the original article Hit count: 278

Filed under:
|
|

Hi, I'm new to rails and I'm trying to make a help page that just lists questions and answers. Currently I have something very simple like this :

<% @helps.each do |help| %>
<%=h help.category %>
<%=h help.question %>
<%=h help.answer %>
<% end %>

Along with each question and answer is a category they belong to. How do i create a dropdown that would let users list only the questions belonging to only one category?

Secondly I would like to create a list of all the questions near the top of the page. The questions are actually links that when clicked bring you to the bottom of the page where the question/answer are. or when clicking on the link, it expands providing the answer underneath it, similar to facebooks help page. I think this would involve ajax, or java. It would be great if someone can point me in the right direction.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails