Hello folks I got that error Pls tell me what''s wrong frozen? is defined by ActiveRecord -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
On 30 August 2013 13:33, Tsolmon Narantsogt <mnts26-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello folks > > > I got that error Pls tell me what''s wrong > > frozen? is defined by ActiveRecordWe 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
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 Fri, Aug 30, 2013 at 8:37 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 30 August 2013 13:33, Tsolmon Narantsogt <mnts26-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
On 30 August 2013 13:47, Tsolmon Narantsogt <mnts26-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have to connect to an existing database. > But i got > > ActiveRecord::DangerousAttributeError > frozen? is defined by ActiveRecordPlease 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-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> >> On 30 August 2013 13:33, Tsolmon Narantsogt <mnts26-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.