jpmcgrath / shortener

Shortener makes it easy to create shortened URLs for your rails application.
MIT License
539 stars 223 forks source link

Allow to configure different database for shortened_urls table #140

Closed jweslley closed 3 years ago

jweslley commented 3 years ago

Since Rails 6.1+, the connects_to method can only be called on ActiveRecord::Base or abstract classes, otherwise, a NotImplementedError will be thrown.

This PR creates a hook to allow connecting to a distinct database, other than the main one.