Can't convert Symbol to string

I found neither 'can't convert' nor 'can't convert Symbol to String'
in the source of 1.2.3 rails or ruby 1.8.6. My best guess would be an
empty string.

Michael

From the code you’ve pasted, :class_name => :teste seems to be the problem

From what I know it should be :class => :teste assuming you have all the spellings correct.

Thanks & Regards,

Dhruva Sagar.

Mike Ditka - “If God had wanted man to play soccer, he wouldn’t have given us arms.”

I have habtm relationships as follows...

class Schoolclass < ActiveRecord::Base
has_and_belongs_to_many :students, :join_table =>
:student_schoolclasses
has_and_belongs_to_many :tests, :class_name => :teste, :join_table =>

Should that be :class_name => :test rather than :teste?

Colin

I have habtm relationships as follows...

class Schoolclass < ActiveRecord::Base
has_and_belongs_to_many :students, :join_table =>
:student_schoolclasses
has_and_belongs_to_many :tests, :class_name => :teste, :join_table =>

Should that be :class_name => :test rather than :teste?

Or even :class => :test

:class => :teste is giving error Unknown key(s): class,
It should be :class_name => :teste only. I'm sure.

My Two models are teste.rb , schoolclass.rb

i) class Teste < ActiveRecord::Base
set_table_name "tests"
has_and_belongs_to_many :schoolclasses, :join_table =>
:test_schoolclasses, :order=>'schoolclasses.standard, ASCII(division)
asc'

end

ii) class Schoolclass < ActiveRecord::Base

has\_and\_belongs\_to\_many :students, :join\_table =&gt;

:student_schoolclasses
has_and_belongs_to_many :tests, :class_name => :teste, :join_table
=>
:test_schoolclasses

Try :class_name ='Teste'

Colin

:class => :teste is giving error Unknown key(s): class,
It should be :class_name => :teste only. I'm sure.

My Two models are teste.rb , schoolclass.rb

i) class Teste < ActiveRecord::Base
   set_table_name "tests"
  has_and_belongs_to_many :schoolclasses, :join_table =>
:test_schoolclasses, :order=>'schoolclasses.standard, ASCII(division)
asc'

end

ii) class Schoolclass < ActiveRecord::Base

    has_and_belongs_to_many :students, :join_table =>
:student_schoolclasses
    has_and_belongs_to_many :tests, :class_name => :teste, :join_table
=>
:test_schoolclasses

                                      :class_name => 'Teste'

end

What's the problem here?
--

When you get an error message about "Can't convert Symbol to string" even though there is a Symbol#to_s, perhaps you need to look at using a String where you presently have a Symbol.

-Rob

Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com