Fixed load of adapter problem.

This commit is contained in:
Martin Edenhofer 2012-04-14 13:25:57 +02:00
parent eb85745c04
commit ce383eefd3
2 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ class Ticket < ActiveRecord::Base
return @@number_adapter if @@number_adapter
case adapter_name
when Symbol, String
require "ticket/number/#{adapter_name}"
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}"

View file

@ -559,14 +559,14 @@ Setting.create(
:name => 'ticket_number',
:tag => 'select',
:options => {
'Increment' => 'Increment',
'Date' => 'Date',
'increment' => 'Increment (SystemID.Counter)',
'date' => 'Date (Year.Month.Day.SystemID.Counter)',
},
},
],
},
:state => {
:value => 'Increment',
:value => 'increment',
},
:frontend => false
)