I have to provide a link based on a value stored in session object but
getting the session object nil in the view.
Following is the error message:
ActionView::TemplateError: You have a nil object when you didn't
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.
On line #13 of admin/details/new.rhtml
10: <% if params["for_entity"] %>
11: <%= submit_tag(t("quick_submit"), :name => "quick_commit")%> |
13: <%=link_to t("cancel"),session["return-to"] %>
14: <% end -%>
Can anyone guide me how the session object is fine in the controller
and the very next instant its nil in the view?