title: How to initiate new profile object (has_one) after successful registration with Rails3 & devise
body: <p>So I have devise setup to perform registration. After registration the user is redirected to profiles#new however I can't attach profile to current_user id</p>
  
  <p>Actually it doesn't work at all. Here is what I have in my profiles_controller.rb</p>
  
  <pre><code># POST /profiles
  </code></pre>
  
  <p>def create
      @profile = current_user.Profile.new(params[:profile])</p>
  
  <pre><code>respond_to do |format|
    if @profile.save
      format.html { redirect_to(@profile, :notice =&gt; 'Profile was successfully created.') }
    else
      format.html { render :action =&gt; "new" }
    end
  end
  </code></pre>
  
  <p>end</p>
  
  <p>leading to undefined method `Profile' for #</p>