Frozen? is defined by ActiveRecord

Hello folks

I got that error Pls tell me what’s wrong

frozen? is defined by ActiveRecord

On 30 August 2013 13:33, Tsolmon N. [email protected] wrote:

Hello folks

I got that error Pls tell me what’s wrong

frozen? is defined by ActiveRecord

We are not telepathic so without knowing what you are doing it is
impossible to say. Post the full error and stack trace (if any) and
the section of code causing the problem. Not your whole app just a
few lines around the area where the problem occurs.

Colin

I have to connect to an existing database.
But i got

ActiveRecord::DangerousAttributeError frozen? is defined by ActiveRecord

My code is here:

class Customer < ActiveRecord::Base
establish_connection :my_connection
self.table_name = ‘customer’
self.primary_key = ‘customer_no’
def self.get_all_customer
@customer_data = Customer.find_by_sql(“select customer_no from
customer_table”)
return @customer_data
end
end

Thanks

On 30 August 2013 13:47, Tsolmon N. [email protected] wrote:

I have to connect to an existing database.
But i got

ActiveRecord::DangerousAttributeError
frozen? is defined by ActiveRecord

Please don’t top post, it makes it difficult to follow the thread.
Insert your reply inline in the previous post. Thanks.

Have you got a column in the db called frozen? If so then it is
warning you that the name conflicts with an ActiveRecord method.

Colin