I have a Rails 3 scope that excludes an array of ids.
What is the best way to write the scope so that it does nothing when the array is empty and is still chainable? I c
In Rails 4 you can use:
scope :excluding_ids, ->(ids) { where.not(id: ids) }