diogob / carrierwave-postgresql

Use PostgreSQL large objects (AKA BLOBs) to store your files inside the database
http://diogob.github.com/carrierwave-postgresql/
MIT License
56 stars 25 forks source link

Deprecation warning when using active_record 4 #8

Closed asartalo closed 11 years ago

asartalo commented 11 years ago

There are deprecation warnings thrown when using rails 4,

DEPRECATION WARNING: #connection is deprecated in favour of accessing it via the class

Enabling debugging reveals the affected lines:

lib/carrierwave/storage/postgresql_lo.rb:51 lib/carrierwave/storage/postgresql_lo.rb:81

More info here about the active_record change: https://github.com/rails/rails/pull/9371

asartalo commented 11 years ago

I forked the project and followed the contribution instructions but I'm not really sure about adding the tests. The specs run successfully though even against activerecord 3.2.8. I'll send a pull request but let me know if there's anything I need to change.

diogob commented 11 years ago

Current specs should suffice, thanks for the PR :D