Создание профиля для пользователей Devise

Поэтому я предпринял шаги, описанные вМодель профиля для пользователей Devise? Я использую рельсы 4 и ruby 1.9.3p448

class User < ActiveRecord::Base

devise :database_authenticatable, :registerable,
       :recoverable, :rememberable, :trackable, :validatable 

attr_accessible :email, :password, :password_confirmation, :remember_me, :profile_attributes
has_one :profile
accepts_nested_attributes_for :profile       


protected

def profile
  super || build_profile
end 

end
#
class Profile < ActiveRecord::Base  
    belongs_to :user
    attr_accessible :uname, :manager
end
#
<h2>Sign up...</h2>
<%= form_for resource, :as => resource_name, :url => registration_path(resource_name) do |f| %>

<%= devise_error_messages! %>

<div><%= f.label :email %><br />
<%= f.email_field :email, :autofocus => true %></div>
<div><%= f.label :password %><br />
<%= f.password_field :password %></div>
<div><%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation %></div>  

<%= f.fields_for :profile do |profile_form| %>
  <h2><%= profile_form.label :uname %></h2>
  <p><%= profile_form.text_field :uname %></p>  
  <h2&,gt;<%= profile_form.label :manager %></h2>
  <p><%= profile_form.text_field :manager %></p>
<% end %>  

<div><%= f.submit "Sign up" %></div>
<% end %>
<%= render "devise/shared/links" %>
#

Все еще не могу сохранить профиль для пользователя, и это вывод:

  Parameters: {"utf8"=>"✓", "authenticity_token"=>"kG7S9lF4+5hm+ggmKA4LZyXrN4hsPf01jGQvKxgzGGI=", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "profile_attributes"=>{"uname"=>"1", "manager"=>"1"}}, "commit"=>"Sign up"} **Unpermitted parameters: profile_attributes**

Должен ли я сделать что-нибудь в контроллере профилей? заранее спасибо

Ответы на вопрос(2)

Ваш ответ на вопрос