Topic: Rails ActiveRecord ManytoMany through Join table - Change Column Value

I have the following join table, Models and setup using MS SQLServer

class Divisioncustomer < ActiveRecord::Base
  set_primary_key 'DivisionCustomer'
  belongs_to :division, :class_name => 'Division', :foreign_key => 'DivisionID'
  belongs_to :customer, :class_name => 'Customer', :foreign_key => 'CustomerID'
end

class Shelf < LibraryDB
  set_primary_key 'ShelfID'
  belongs_to :division, :class_name => 'Division', :foreign_key => 'DivisionID'
  has_many :divisioncustomers, :foreign_key => 'DivisionCustomer'
  has_many :customers, :through => :divisioncustomers, :source=>'customer'

  def self.table_name
    "Shelves"
  end
end

My 2 Tables are 1) Shelves - Has foreign key (DivisionCustomer - varchar) to 2) DivisionCustomers join table with 3 cols DivisionID (int), DivisionCustomer (varchar), CustomerID (int)

RESULTS
I try to do the following
>> s = Shelf.find_by_DivisionCustomer('0414339')
    s = Shelf.find_by_DivisionCustomer('0414339')

Success Get back record
=> #<Shelf ShelfID: 1, Description: "XXX LIBRARY", ParentShelfID: nil, DivisionID: 2,
DivisionCustomer '38238D'

But when do the Following - Get an error Any way to change the "Where Column VALUE" to
match One problem is I always join on an ID = 1 value ANY WAY TO CHANGE the WHERE VALUE to
'38238D' from the Shelves table??
>> s.customers
s.customers

ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute

    OLE error code:80040E07 in Microsoft OLE DB Provider for SQL Server

      Conversion failed when converting the varchar value 'DAR400' to data type int.

    HRESULT error code:0x80020009

      Exception occurred.: SELECT [customers].* FROM [customers]  INNER JOIN [divisioncustomers] ON [customers].CustomerID = [divisioncustomers].CustomerID    WHERE (([divisioncustomers].DivisionCustomer = 1))

Thanks