Hi, I'm using Rails version 2.3.2 but it seems that my fixtures are wrong and when testing a relation among two models does not appear. I have no problems executing the application, only with tests.
These are my fixtures: /***** ingresos.yml *****/ primero: origen: jack (Cliente) tipo: Banco fecha: 2009-06-05 cantidad: 10 /***** clientes.yml *****/ jack: nombre: Jack Sephard The error (The error ocurred while evaluating nil.nombre) is in this line: /***** show.html.erb *****/ <%=h @ingreso.origen_type %>: <%= @ingreso.origen.nombre %> The models are these: /***** ingreso.rb *****/ class Ingreso < ActiveRecord::Base belongs_to :origen, :polymorphic => true /***** cliente.rb *****/ class Cliente < ActiveRecord::Base has_many :ingresos, :as => :origen /**********************/ Any idea will be appreciated. Thanks in advance. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

