# Super noob looking for help

**URL:** <https://www.ruby-forum.com/t/super-noob-looking-for-help/178817>\
**Category:** Rails\
**Created:** [November 11, 2009, 7:33pm UTC](https://www.ruby-forum.com/t/super-noob-looking-for-help/178817 "2009-11-11T19:33:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@brian](https://www.ruby-forum.com/u/brian)\
**Post date:** [November 11, 2009, 7:33pm UTC](https://www.ruby-forum.com/t/super-noob-looking-for-help/178817/1 "2009-11-11T19:33:57Z")

</div>

Hello all,  
I’ve just started to play around on Ruby and have read some tutorials,  
books, and Why’s guide. I do understand syntax of coding, or at least  
that within the controller, but I have limited web programming  
experience, so the view is giving me some problems. So here is the  
issue,

I have a database of wines, that i’d like to be able to select by the  
producer, and then those the associated wines. I thought this would  
work, but I keep getting the ‘Couldn’t find Wine with ID=Show’ error.  
Any help and or pointers on this would be great. Thanks a ton!

from view:  
\<% form\_for @wines, :url =\> { :action =\> ‘Show’ } do |f| %\>

Producer: \<%= collection\_select(:wine,:desc,@wines,:id,:desc,  
options ={:prompt =\> “Select a producer”}) %\>

\<%= submit\_tag ‘Submit’ %\>  
\<% end %\>

from controller:  
def show  
@wine = Wine.find(params[:desc])

```
respond_to do |format|
  format.html # show.html.erb
  format.xml { render :xml => @wine }
end

```

end

---

<div class="post-metadata">

**Author:** ![brian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@brian](https://www.ruby-forum.com/u/brian)\
**Post date:** [November 11, 2009, 10:06pm UTC](https://www.ruby-forum.com/t/super-noob-looking-for-help/178817/2 "2009-11-11T22:06:16Z")

</div>

Brian wrote:

> Hello all,  
> I’ve just started to play around on Ruby and have read some tutorials,  
> books, and Why’s guide. I do understand syntax of coding, or at least  
> that within the controller, but I have limited web programming  
> experience, so the view is giving me some problems. So here is the  
> issue,
> 
> I have a database of wines, that i’d like to be able to select by the  
> producer, and then those the associated wines. I thought this would  
> work, but I keep getting the ‘Couldn’t find Wine with ID=Show’ error.  
> Any help and or pointers on this would be great. Thanks a ton!
> 
> from view:  
> \<% form\_for @wines, :url =\> { :action =\> ‘Show’ } do |f| %\>

\<% form\_for @wines, :url =\> { :action =\> ‘show’ } do |f| %\>  
The action name is ‘show’ not ‘Show’

The ‘show’ action is for displaying the details of one item, yet you  
have @wines (a collection) in your form\_for.

\<% form\_for @wine do |f| %\>

This syntax would take care of everything for showing the detail view  
via the ‘show’ action.

In your case it sounds like you might be trying to make a search form.  
If that’s the case you probably shouldn’t be using form\_for anyway, but  
rather form\_tag.

Have you read though the Rails Guide on form helpers?

> **[Action View Form Helpers — Ruby on Rails Guides](https://guides.rubyonrails.org/form_helpers.html)**
>
> Action View Form HelpersForms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of the need to handle form control naming and its numerous attributes. Rails...
