Problem with two relationships to the same table

Rakoon Smith wrote:

ActiveRecord::AssociationTypeMismatch in InscripcionController#create
Profesion expected, got String
...
  belongs_to :profesion_padre, :class_name=> "Profesion", :foreign_key
=> "profesion_padre_id"
  belongs_to :profesion_madre, :class_name=> "Profesion", :foreign_key
=> "profesion_madre_id"
end

I get the error when the execution reach this point:
     t=Titular.new(params[:titular])

The params of the request are:

Request
Parameters: {"commit"=>"Create", "titular"=>{"profesion_padre"=>"10",
"profesion_madre"=>"4"}}

The select helpers in your view should be

<%= select :titular, :profesion_padre_id %> and
<%= select :titular, :profesion_madre_id %>, not
<%= select :titular, :profesion_padre %> and
<%= select :titular, :profesion_madre %>.