Permalink
Browse files

Fix broken preference in ToFriendMailer, use Spree 1.0 style config

  • Loading branch information...
1 parent d559a18 commit d1093de5321b3926b015bb369e51ab1990eb8bce @davidnorth committed Apr 20, 2012
@@ -6,8 +6,8 @@ def mail_to_friend(object, mail)
@mail = mail
opts = {}
- if mail.hide_recipients && Spree::Config[:hidden_recipients_to_address]
- opts[:to] = Spree::Config[:hidden_recipients_to_address]
+ if mail.hide_recipients && SpreeEmailToFriend::Config[:hidden_recipients_to_address]
+ opts[:to] = SpreeEmailToFriend::Config[:hidden_recipients_to_address]
opts[:bcc] = mail.recipient_email
else
opts[:to] = mail.recipient_email
@@ -0,0 +1,3 @@
+class Spree::EmailToFriendConfiguration < Spree::Preferences::Configuration
+ preference :hidden_recipients_to_address, :string, :default => ''
+end
@@ -0,0 +1,3 @@
+module SpreeEmailToFriend
+ Config = Spree::EmailToFriendConfiguration.new
+end

0 comments on commit d1093de

Please sign in to comment.