lib/bulletware.rb in flyerhzm-bullet-1.1.0 vs lib/bulletware.rb in flyerhzm-bullet-1.2.0
- old
+ new
@@ -10,10 +10,10 @@
status, headers, response = @app.call(env)
return [status, headers, response] if response.empty?
if Bullet::Association.has_bad_assocations?
if !headers['Content-Type'].nil? and headers['Content-Type'].include? 'text/html'
- response_body = response.body.insert(-17, Bullet::Association.bad_associations_alert)
+ response_body = response.body << Bullet::Association.bad_associations_alert
headers['Content-Length'] = response_body.length.to_s
end
Bullet::Association.log_bad_associations(env['PATH_INFO'])
end