Hobo / hobo

The web app builder for Rails (moved from tablatom/hobo)
http://hobocentral.net
103 stars 39 forks source link

Fix apply_scopes to allow further refinement of result #156

Closed enwood closed 9 years ago

enwood commented 9 years ago

apply_scopes should be sending scope to result, not to self, to allow for repeated calls (further refinement) when multiple scope parameters are passed. e.g.

http://localhost:3000/admin/entities?status=active&entity_type=corporation

scopes.merge!(status_is: params[:status])
scopes.merge!(entity_type_is: params[:entity_type])

Further details: https://groups.google.com/forum/?hl=en#!topic/hobousers/EtgRMr1RAUE

iox commented 9 years ago

Thanks Tim!