Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (22 sloc) 0.571 kB
require "stringex/acts_as_url/adapter/base"
require "stringex/acts_as_url/adapter/active_record"
require "stringex/acts_as_url/adapter/mongoid"
module Stringex
module ActsAsUrl
module Adapter
def self.add_loaded_adapter(adapter)
@loaded_adapters << adapter
end
def self.load_available
@loaded_adapters = []
constants.each do |name|
adapter = const_get(name)
adapter.load if adapter.loadable?
end
end
def self.first_available
@loaded_adapters[0]
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.