Hi,

I'm running Rails 2.3.5 & Ruby 1.8.7 on Windows XP.

I have two partials:
1. File app\views\warehousing\_index.html.erb has
      .....
      <%= select_tag(:filter_by_category, "<option>-Select a category-
</option>" +
 
options_from_collection_for_select(Categories.find(:all, :order =>
'name'), :name, :name)) %>
      .....
      <%= render :partial => 'warehousing/entry', :locals =>
{:filter_by_category => "Hello World"} %>
      .....
2. File app\views\warehousing\_entry.html.erb has
      .....
      <div>Selected category is <%= filter_by_category %></div>
      .....

On the displayed page, it shows:

      Selected category is Hello World

That means the string "Hello World" in variable filter_by_category is
indeed passed from one partial to the other.  For my project, I want
to pass the selected option value from the select_tag to partial
_entry.html.erb, i.e. in file _entry.html.erb, for line
    <%= render :partial => 'warehousing/entry', :locals =>
{:filter_by_category => ???} %>
what should I put in for "???".

Thanks for any help that you could offer.
Hoca

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to