lib/snaptable/constructor/collection.rb in snaptable-0.9.3 vs lib/snaptable/constructor/collection.rb in snaptable-1.0.0

- old
+ new

@@ -1,14 +1,10 @@ module Snaptable module Constructor module Collection def collection - @collection ||= if Snaptable.use_permission - current_permission.records(params[:controller], model, @token) - else - model - end.includes(belongs_to_associations) + model.includes(belongs_to_associations) end def records @records ||= filter(collection).paginate(page: params[:page], per_page: 30).order(sort_column + " " + sort_direction) end \ No newline at end of file