Writing test cases for mysql errors

8 views
Skip to first unread message

Sumit Srivastava

unread,
Dec 7, 2012, 1:02:07 AM12/7/12
to rubyonra...@googlegroups.com
Hi,

I just encountered a MySql error for ambiguous columns. I fixed it but I need to write test cases for such happenings to avoid any such instance in future.

Regards,
Sumit

Colin Law

unread,
Dec 7, 2012, 4:29:18 AM12/7/12
to rubyonra...@googlegroups.com
On 7 December 2012 06:02, Sumit Srivastava
You question is, ironically, ambiguous. Can you give us a specific
example of the problem you want to test for.

Colin

sumit srivastava

unread,
Dec 7, 2012, 5:15:41 AM12/7/12
to rubyonra...@googlegroups.com

I joined two tables. I missed to specify the table name for some columns in the controller. I am using Jquery dataTables. This error arises only when one searches for something on this table and then tries to sort it using some specific column. So, if this column doesn't have table name specified with it in the controller, it throws error.

Seems improbable to write a universal test case for this. Its more like a syntactical error.


Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages