Rails 3 ActiveRecord chaining

I am new to Rails and I'm not sure why my chain is not working.

Job

my_model.select('name').where('status_id = 6').all 

Does not work

 my_model.select('name').where('status_id = 6').order('name') 

Why does the order chain after where fail the query? I tried adding .all after .order , but that didn't work either.

+4
source share
1 answer

Source: https://habr.com/ru/post/1344325/


All Articles