-
-
Save ryanstrandt/572257 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActionView::TemplateError (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.collect) on line #3 of app/views/news/_all_news.html.erb: | |
1: <div id="news"> | |
2: <%= link_to_remote "Add News", :url => new_news_url, :with => "'filter='+$('#filter')[0].value", :method => :get, :loading => "$('#spinneraddnews').show();", :complete => "$('#spinneraddnews').hide();" %> <%= spinner("addnews") %> | |
3: <%= select_tag "filter", grouped_options_for_select([ [ "", [["Everything",""]] ], [ "Ministries", @ministries_with_news.collect{ |m| [ m.name, "m_#{m.id}" ] } ], [ "Groups", @groups_with_news.collect{ |m| [ m.name, "g_#{m.id}" ] } ] ], params[:filter]) | |
4: %> | |
5: <%= observe_field :filter, | |
6: :function => %|document.location = "#{url_for(:controller => params[:controller], :action => params[:action])}?filter="+$('#filter')[0].value;| |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment