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 <[email protected]> wrote:
> On 30 August 2013 13:33, Tsolmon Narantsogt <[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
>
> >
> >
> >
> > --
> > 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 [email protected].
> > To post to this group, send email to [email protected].
> > 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
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.