Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix broken preference in ToFriendMailer, use Spree 1.0 style config

  • Loading branch information...
commit d1093de5321b3926b015bb369e51ab1990eb8bce 1 parent d559a18
@davidnorth authored
View
4 app/mailers/spree/to_friend_mailer.rb
@@ -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
View
3  app/models/spree/email_to_friend_configuration.rb
@@ -0,0 +1,3 @@
+class Spree::EmailToFriendConfiguration < Spree::Preferences::Configuration
+ preference :hidden_recipients_to_address, :string, :default => ''
+end
View
3  config/initializers/load_configuration.rb
@@ -0,0 +1,3 @@
+module SpreeEmailToFriend
+ Config = Spree::EmailToFriendConfiguration.new
+end
Please sign in to comment.
Something went wrong with that request. Please try again.