diff --git a/.gitignore b/.gitignore index 6203373e9..62f488a3c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,9 @@ Gemfile.lock # Ignore .swp files .*.swp +# Ignore coverage stuff +/coverage/* + # Ignore local changes to schema.rb (e. g. through extentions) db/schema.rb diff --git a/app/models/application_model.rb b/app/models/application_model.rb index 138a87db5..a9dbd459e 100644 --- a/app/models/application_model.rb +++ b/app/models/application_model.rb @@ -1,3 +1,5 @@ +require 'Cache' + class ApplicationModel < ActiveRecord::Base self.abstract_class = true diff --git a/app/models/ticket.rb b/app/models/ticket.rb index 7afa97453..3c4f34f28 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -24,12 +24,12 @@ class Ticket < ApplicationModel def number_adapter=(adapter_name) return @@number_adapter if @@number_adapter - case adapter_name + case adapter_name when Symbol, String - require "ticket/number/#{adapter_name.to_s.downcase}" + require "ticket/number/#{adapter_name.to_s.downcase}" @@number_adapter = Ticket::Number.const_get("#{adapter_name.to_s.capitalize}") else - raise "Missing number_adapter #{adapter_name}" + raise "Missing number_adapter '#{adapter_name}'" end end