diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2ab710f..544dd3a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,7 +1,12 @@ module ApplicationHelper def current_database - ActiveRecord::Base.connection().current_database + begin + ActiveRecord::Base.connection().current_database + rescue + # Sqlite/possibly other adapters may not implement the current_database method + ActiveRecord::Base.configurations[RAILS_ENV]["database"] + end end end