Skip to content

Commit

Permalink
Fix preference registration
Browse files Browse the repository at this point in the history
  • Loading branch information
LBRapid committed Dec 1, 2011
1 parent 2b51a3c commit 3131299
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions lib/spree/captcha/config.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
module Spree::Captcha
class Config < Spree::Config
class << self
def instance
return nil unless ActiveRecord::Base.connection.tables.include?('configurations')
CaptchaConfiguration.find_or_create_by_name('Captcha configuration')
module Spree
module Captcha
class Config
include Singleton
include PreferenceAccess

class << self
def instance
return nil unless ActiveRecord::Base.connection.tables.include?('configurations')
Spree::CaptchaConfiguration.find_or_create_by_name('Captcha configuration')
end
end
end
end
end
end

0 comments on commit 3131299

Please sign in to comment.