I have two tables, people and players. When I do a find on Player and join people, the wrong id is being returned for my player object.
Here is an example.
Models: class Person < ActiveRecord::Base has_one :player end
class Player < ActiveRecord::Base belongs_to :person end
Controller: @players = Player.find(:all, :joins => "join people on players.person_id = people.id", :order => "people.last_name, people.first_name" )
View: <% for player in @players %> <p><%= player.id =>, <%= player.person_id => <%end%>
Here is one of the entries in the players table.