Merge remote-tracking branch 'ricec/master'

* ricec/master:
  Fixes nested ability conditions in issue #859
Merge remote-tracking branch 'neubloc/master'

* neubloc/master:
  treat ActiveRecord::Relation as Array