lib/puffer/resource.rb in puffer-0.0.12 vs lib/puffer/resource.rb in puffer-0.0.13

- old
+ new

@@ -92,12 +92,15 @@ Resource.new child_params, request end end + def collection_scope + parent ? parent.member.send(model_name.pluralize) : model + end + def collection - scope = parent ? parent.member.send(model_name.pluralize) : model - scope.includes(includes).where(searches(params[:search])).order(order).paginate :page => params[:page] + collection_scope.includes(includes).where(searches(params[:search])).order(order).paginate :page => params[:page] end def member if parent if plural?