importing more rails 4 compatible code from latest sunspot/sunspot-rails

 (barf)