Has_one and Strong Attributes

Hey, I’m using Rails4.rc2 and here is my problem:

I have model called Manager, it has_one ManagerContact and ManagerBank. I’m trying to build a form in which Manager can update his ManagerContact and ManagerBank.

Controller in charge of profile:


def profile
@manager = current_manager
@contact = @manager.manager_contact.nil? ? @manager.build_manager_contact : @manager.manager_contact
@bank = @manager.manager_bank.nil? ? @manager.build_manager_bank : @manager.manager_bank
end

def update_profile
current_manager.update_attributes(manager_params)

redirect_to managers_profile_path
end
private
def manager_params
params.require(:manager).permit(:biz_type,
:manager_contact => [:first_name, :last_name, :phone_number, :dob],
:manager_bank => [:account_holder, :routing, :account]
)
end

In the view(I omitted some inputs to save space) :

= form_for @manager, url: managers_edit_path, method: :post do |f|
.divider
%fieldset
%legend Personal Information
= f.fields_for @contact do |ff|
.inputs
= ff.label :first_name
= ff.text_field :first_name

.divider
%fieldset
  %legend Bank Information
  = f.fields_for @bank do |ff|
    .inputs
      = ff.label :account_holder
      = ff.text_field :account_holder

.divider
%fieldset
  = f.submit 'Save Changes', class: 'button active'