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"

I get the error when the execution reach this point:[:titular])

The params of the request are:

Parameters: {"commit"=>"Create", "titular"=>{"profesion_padre"=>"10",

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 %>.