Browse files

Corrected the admin configuration path and default to environment var…

…iable
  • Loading branch information...
1 parent 8bfbd89 commit cb66dda37eae145c5df6f0e4eaaae5baa13c54be @bhattisatish bhattisatish committed Jan 19, 2012
View
4 app/models/captcha_configuration.rb
@@ -2,8 +2,8 @@ class CaptchaConfiguration < Configuration
THEMES = ['red', 'white', 'blackglass', 'clean', 'custom']
# this keys works for localhost
- preference :private_key, :string, :default => '6LfIsgEAAAAAAGfB6Z0lEUtdL3GVuBkRa9cYlMZz'
- preference :public_key, :string, :default => '6LfIsgEAAAAAALpT20eiC3RslZQmmCbiNS-AUvSe'
+ preference :private_key, :string, :default => ENV['RECAPTCHA_PUBLIC_KEY'] || '6LfIsgEAAAAAAGfB6Z0lEUtdL3GVuBkRa9cYlMZz'
+ preference :public_key, :string, :default => ENV['RECAPTCHA_PRIVATE_KEY'] || '6LfIsgEAAAAAALpT20eiC3RslZQmmCbiNS-AUvSe'
preference :theme, :string, :default => 'red'
preference :use_captcha, :boolean, :default => true
end
View
4 app/overrides/add_captcha_settings_to_admin_configurations_menu.rb
@@ -1,5 +1,5 @@
-Deface::Override.new(:virtual_path => "spree/admin/configurations/index",
+Deface::Override.new(:virtual_path => "admin/configurations/index",
:name => "converted_admin_configurations_menu_384123912",
:insert_after => "[data-hook='admin_configurations_menu'], #admin_configurations_menu[data-hook]",
- :text => "<%= configurations_menu_item(I18n.t('captcha.captcha_settings'), main_app.admin_captcha_settings_path, I18n.t('captcha.manage_keys')) %>",
+ :text => "<%= configurations_menu_item(I18n.t('captcha.captcha_settings'), admin_captcha_settings_path, I18n.t('captcha.manage_keys')) %>",
:disabled => false)

0 comments on commit cb66dda

Please sign in to comment.