Re: [Rails] Re: Can't convert Symbol to string

2011-11-22 Thread Sathia S
Hi > > ruby-1.9.2-p180 > a string"+:a_symbol #=> TypeError: can't convert > Symbol into String > > You cannot concat string to symbol directly. convert symbol to string and then concat it. "string"+:sym.to_s *to_s *is used to convert to string --

[Rails] Re: Can't convert Symbol to string

2011-11-21 Thread Nat Noordanus
I came had this error and found it was being caused by trying to add a symbol to a string. ruby-1.9.2-p180 > a string"+:a_symbol #=> TypeError: can't convert Symbol into String -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Gro

[Rails] Re: Can't convert Symbol to string

2009-08-25 Thread Colin Law
2009/8/25 Archana Thota : > > :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 :schoolclass

[Rails] Re: Can't convert Symbol to string

2009-08-25 Thread Rob Biedenharn
On Aug 25, 2009, at 6:20 AM, Archana Thota wrote: > > :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_bel

[Rails] Re: Can't convert Symbol to string

2009-08-25 Thread Archana Thota
: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

[Rails] Re: Can't convert Symbol to string

2009-08-25 Thread Colin Law
2009/8/25 Colin Law : > 2009/8/25 Archana Thota : >> >> 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 => >

[Rails] Re: Can't convert Symbol to string

2009-08-25 Thread Colin Law
2009/8/25 Archana Thota : > > 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 => :

[Rails] Re: Can't convert Symbol to string

2009-08-25 Thread Dhruva Sagar
>From the code you've pasted, :class_name => :teste seems to be the problemFrom 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 ma