nil objects

you can try two ways.

In controller,

unless session[:exhibition] # enters this block when session is nil and u can assign it here end

OR

Give a condition before the text_field In view,

<% if !(session[:exhibition].nil?)%> <%=text field.................... %> <%end%>