[Rails] Rails Advance query CASE WHEN method not working

2015-07-31 Thread Nilay Singh
Is there anyone who can suggest me the solution for a Find_by_sql query here when I am using mysql that work perfect . But when I converted that into active record It is not showing the exact result . First I have tried this code below using find_by_sql: @message3 =

Re: [Rails] Rails Advance query CASE WHEN method not working

2015-07-31 Thread Scott Ribe
On Jul 31, 2015, at 11:43 AM, Nilay Singh li...@ruby-forum.com wrote: SO here is the code which I have tried in active record style : I'm pretty sure this is different than what you posted last time. And you might try giving a real answer to Elizabeth's question--that looks suspiciously like