I'm new to Rails and I'm not sure why my chaining isn't working.
Working
my_model.select('name').where('status_id = 6').all
Not Working
my_model.select('name').where('status_id = 6').order('name')
Why does chaining the order
after the where
not execute the query? I've tried a开发者_StackOverflowdding the .all
after the .order
but that didn't seem to work either.
Looks like this is a known bug in the jdbc adapter: http://kenai.com/jira/browse/ACTIVERECORD_JDBC-154
If you make these changes it will fix it: https://github.com/ystael/activerecord-jdbc-adapter/commit/8815d2fe133afb6774ebe12cc27c3a977dbf7ad2
精彩评论