RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: paolotax
Any idea on how to implement with postgresql
def self.with_last_state(state) order("id desc").group("order_id").having(state: state) end
and the relative scope in Order model
Any idea on how to implement with postgresql
and the relative scope in Order model