On 30 August 2013 13:47, Tsolmon Narantsogt <mnts26@gmail.com> 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
>
> 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 Fri, Aug 30, 2013 at 8:37 PM, Colin Law <clanlaw@googlemail.com> wrote:
>>
>> On 30 August 2013 13:33, Tsolmon Narantsogt <mnts26@gmail.com> 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
>>
>> >
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Ruby on Rails: Talk" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to rubyonrails-talk+unsubscribe@googlegroups.com.
>> > To post to this group, send email to rubyonrails-talk@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/rubyonrails-talk/CAPs6WSe4y1iYPihgdRSSFu4rYcsJdXEePKLFd8EaJ%3D3zTYqk_A%40mail.gmail.com.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to rubyonrails-talk+unsubscribe@googlegroups.com.
>> To post to this group, send email to rubyonrails-talk@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLth%2Bhye3H%2BHJn88XvDFE8ReOsTnc3uq0qRFYLsq9XXoEw%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/CAPs6WScQTOAtNu9vvcVO%3Dmwf%3D5%2BJfwTKMpusWF_Z8BAHAuOJyA%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLt95_h%3D_-Fvw4s3yjWaF4aWzvXi0fcmMDH_rgHto%2BcqjA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment