ianwhite / orm_adapter

Provides a single point of entry for using basic features of ruby ORMs
MIT License
194 stars 76 forks source link

Get rid of deprecation warning about activerecord #13

Closed dxw closed 12 years ago

dxw commented 12 years ago

On Ubuntu (and probably in other places) a deprecation warning is generated if you require activerecord.

This update attempts to load active_record first, and then falls back to loading activerecord if that was unsuccessful. Before, it was the other way around.

Change tested and seems ok using Rails 3.2.0/Ruby 1.9.3 under Ubuntu 12.04.

josevalim commented 12 years ago

We should just remove the rescue clause altogether and stop supporting old active record versions.

dxw commented 12 years ago

I wasn't sure whether that was ok - figured that it might break some things. But yes, if it's not going to break people's stuff, I agree that would be better.

josevalim commented 12 years ago

If I am not wrong, that old format is deprecated since Rails 2.3, so I am fine with breaking compatibility on those ones.

dxw commented 12 years ago

Wow ok, yes. That's pretty old. Gimme 2 secs and I'll make a new pull request.