Re: [Rails] Writing test cases for mysql errors
On 7 December 2012 14:59, Colin Law <clanlaw@googlemail.com> wrote:
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.
On 7 December 2012 06:02, Sumit Srivastava
<sumit.theinvincible@gmail.com> wrote:You question is, ironically, ambiguous. Can you give us a specific
> 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.
example of the problem you want to test for.
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home