# ActionView::TemplateError (You have a nil object when you di

**URL:** <https://www.ruby-forum.com/t/actionview-templateerror-you-have-a-nil-object-when-you-di/185221>\
**Category:** Deployment\
**Created:** [March 16, 2010, 10:30am UTC](https://www.ruby-forum.com/t/actionview-templateerror-you-have-a-nil-object-when-you-di/185221 "2010-03-16T10:30:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![murfhy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Post date:** [March 16, 2010, 10:30am UTC](https://www.ruby-forum.com/t/actionview-templateerror-you-have-a-nil-object-when-you-di/185221/1 "2010-03-16T10:30:08Z")

</div>

actually i am trying to add some values into a dropdown listfrom an  
xml file.while running my application i am getting one error  
mentioned like this

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.map) on line #23 of  
app/views/campaigns/\_top\_section.html.haml:  
20: %tr  
21: %td{ :valign =\> :top }  
22: .label #{t :campaign\_type}:  
23: = f.select :campaign\_type, Setting.unroll(:campaign\_type), {  
:selected =\> (@campaign.campaign\_type || “email\_campaign”).to\_sym }, {  
:style =\> “width:300px” }

please help me
