Sha256: 2b1c40a1ea6d24483a2fe08a2e9d146b690abee420e387afcb3c4203f4ac1f15
Contents?: true
Size: 466 Bytes
Versions: 17
Compression:
Stored size: 466 Bytes
Contents
module Zena klass = ActiveRecord::Base.configurations[RAILS_ENV]['adapter'].capitalize # Loads the wrong adaper when running rake tasks (RAILS_ENV not correct ?) # Is this fixed ? If not, use # ActiveRecord::Base.connection.class.name.split('::').last[/(.+)Adapter/,1].downcase begin Db = Zena.resolve_const("Zena::DbHelper::#{klass}") rescue NameError raise NameError.new("Could not find db helper 'Zena::DbHelper::#{klass}'.") end end # Zena
Version data entries
17 entries across 17 versions & 1 rubygems