Advertisement

08.31.2008 at 04:02AM PDT, ID: 23691994
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

Searching using ruby on rails. And finding all using .find()

Asked by stitty11 in Ruby Scripting Language

Tags:

I am attempting to create two things. The first is a image that links to a find_all page that displays a list of all the data in a database. Below is the code found in the controller file businesses_controller.rb. first is the find_all method and then the search method.

  def find_all
    @business.find(:all)
  end

  def self.search(search)
    find(params[:location_id])
  end

Below is the code for the drop down list that is to be used for searching the business database. This is found in the layout file for the entire application.

<% form_tag find_all_businesses_path, :method => 'get' do %>
        <p>
    <% select :location_id,
                        Business::BUSINESS_LOCATIONS,
                        :prompt => "Select a location" %>

Below is the link code for the image to link to the find_all page.

<%= link_to (image_tag("PriceSearch.png"), :controller => "businesses", :action => "find_all") %>

The code snippet attached is the find_all.html.rb page. For some reason it is not displaying correctly. PLEASE HELP :D. Could you also give me some tips about searching using a drop down list.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
<h1>Displaying All Entries</h1>
<table width=100%>
<thead>
<tr>
<td>
	<strong>Here is a list of all the suppliers</strong>
</td>
</tr>
</thead>
<tbody>
	<tr>
	<td><strong>Id</strong></td>
    <td><strong>Name</strong></td>
    <td><strong>Address</strong></td>
    <td><strong>Post Code</strong></td>
    <td><strong>Phone</strong></td>
    <td><strong>Email</strong></td>
    <td><strong>Maximum</strong></td>
    <td><strong>Location</strong></td>
	</tr>
<tr>
    <td><%=h @business.id %></td>
    <td><%=h @business.name %></td>
    <td><%=h @business.address %></td>
    <td><%=h @business.post_code %></td>
    <td><%=h @business.phone %></td>
    <td><%=h @business.email %></td>
    <td><%=h @business.maximum %></td>
    <td><%=h @business.location_id %></td>
</tr>
	
</tbody>
</table>
[+][-]08.31.2008 at 03:27PM PDT, ID: 22356618

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2008 at 03:29PM PDT, ID: 22356625

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.31.2008 at 06:36PM PDT, ID: 22357046

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Ruby Scripting Language
Tags: Ruby, Rails
Sign Up Now!
Solution Provided By: wesgarrison
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.31.2008 at 09:00PM PDT, ID: 22357422

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.01.2008 at 05:21PM PDT, ID: 22363475

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628