title: Assign id where object is nil
body: <p>Here is my problem. I am struggling with this error</p>
  
  <pre><code>ActionView::Template::Error (undefined method `id' for nil:NilClass):
  37:               &lt;ul class="dropdown"&gt;
  38:                 &lt;li&gt;&lt;%= link_to 'Add Info', new_developer_developer_info_path(current_user.id) %&gt;&lt;/li&gt;
  39:                 &lt;li&gt;&lt;%= link_to 'Edit Profile', edit_developer_registration_path %&gt;&lt;/li&gt;
  40:                 &lt;li&gt;&lt;%= link_to 'Edit Info', edit_developer_developer_info_path(current_user.id, current_user.developer_info.id) %&gt;&lt;/li&gt;
  41:               &lt;/ul&gt;
  42:             &lt;/li&gt;
  43:             &lt;li&gt;&lt;%= link_to 'Dashboard', developer_path(current_user) %&gt;&lt;/li&gt;
  </code></pre>
  
  <p>When a developer(user) is signing up it redirects him to the profile page where there is a navbar (devise). The navbar has a dropdown menu with an edit link. If my developer has already registered then I get no errors because I have an id present for <code>current_user.developer_info.id</code>, but if he hasn't registered then I get an error <code>undefined method 'id' for nil:NilClass</code>. </p>
  
  <p>The solution I found here so far is to create an instance of class <code>@developer_info = DeveloperInfo.new</code> in appropriate controller and pass it <code>@developer_info.id</code> to <code>application.html.erb</code>. But which controller do I have to use? Am I on right direction to fix my problem? I don't have access to <code>devise</code> controller where my developer is signing up. Thank you for help in advance.</p>