Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6699693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:43:33+00:00 2026-05-26T06:43:33+00:00

I am loading a drop down list to select venue and that value passe

  • 0

I am loading a drop down list to select venue and that value passe to load a modal dialog box.Then I got following error.

find_new

Showing app/views/layouts/_dia_venu_search.html.erb where line #5 raised:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.map

Extracted source (around line #5):

2: <span style="text-align: right>
3: 
4: <% form_tag "/calendar/dia_venue_view" do %>
5:  <%= collection_select("venue", "venue_id", @venues , :id, :place, {:prompt => true}) %>
6: <%end%>
7: </span>
8: <span style="text-align: right">

Trace of template inclusion: app/views/layouts/_dia_venue_search.html.erb

RAILS_ROOT: D:/final2011_10_13
Application Trace | Framework Trace | Full Trace

C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_view/helpers/form_options_helper.rb:327:in `options_from_collection_for_select'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_view/helpers/form_options_helper.rb:543:in `to_collection_select_tag'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_view/helpers/form_options_helper.rb:162:in `collection_select'
D:/final2011_10_13/app/views/layouts/_dia_venu_search.html.erb:5:in `_run_erb_app47views47layouts47_dia_venu_search46html46erb_locals_dia_venu_search_object'
D:/final2011_10_13/app/views/layouts/_dia_venu_search.html.erb:4:in `_run_erb_app47views47layouts47_dia_venu_search46html46erb_locals_dia_venu_search_object'
D:/final2011_10_13/app/views/layouts/_dia_venue_search.html.erb:15:in `_run_erb_app47views47layouts47_dia_venue_search46html46erb_locals_dia_venue_search_object'
D:/final2011_10_13/app/views/layouts/_dia_venue_search.html.erb:2:in `_run_erb_app47views47layouts47_dia_venue_search46html46erb_locals_dia_venue_search_object'
D:/final2011_10_13/app/controllers/events_controller.rb:196:in `find_new'

here is my _dia_venu_search.html.erb code:

<span style="text-align: right">
<span style="text-align: right>

<% form_tag "/calendar/dia_venue_view" do %>
<%= collection_select("venue", "venue_id", @venues , :id, :place, {:prompt => true}) %>
<%end%>
</span>
<span style="text-align: right">
<%= submit_tag "search" %>
</span>
</span>

why did I get this error? can anybody help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:43:33+00:00Added an answer on May 26, 2026 at 6:43 am

    Your @venues is returning nil.
    collection_select expect an array.
    try this

    <% @venues = [] unless @venues %>
    <%= collection_select("venue", "venue_id", @venues , :id, :place, {:prompt => true}) %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that is a drop down select list. I also have
I want to select Algeria as default selected value in drop down list.I am
I have the following code that gets the value of a drop down list
I have a drop down list and some styles applied to it from two
I have a drop down in a jsp page having the following code <s:select
After loading a PHP template (using jQuery's load function), this simple script won't make
while loading getfptex(got it from CTAN) batch file ,when i'm extracting this batch file
I have a DataBound DropDownList that is loading fine, but i'd like to insert
I'm trying to create some cascading drop downs. I have my States loading via
I'm loading an ASP.NET dropdown list. Is there any advantage to doing this:: Private

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.