Skip to content

Commit

Permalink
Merge pull request spree-contrib#16 from iloveitaly/better-subject
Browse files Browse the repository at this point in the history
Model subject line after Amazon's.
  • Loading branch information
JDutil committed Aug 30, 2012
2 parents 327975b + 04b71f0 commit 8610c6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/spree/mail_to_friend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class Spree::MailToFriend
validates :invalid_recipients, :length => {:maximum => 0, :message => "must be removed"}

def initialize(opts = {})
@subject = opts[:subject] || I18n.t('email_to_friend.you_would_like_this')
@sender_email = opts[:sender_email] || ' '
@sender_name = opts[:sender_name] || @sender_email.split('@', 2)[0].titleize
@subject = opts[:subject] || I18n.t('email_to_friend.you_would_like_this', :sender_name => @sender_name, :site => Spree::Config[:site_url])

@recipients = []
@invalid_recipients = []
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ en:
send_message: "Tell your friend!"
mail_sent_to: "Mail sent to %{email} "
send_to_other: "Send to other friend"
you_would_like_this: "I think you would like this item"
you_would_like_this: "%{sender_name} wants you to see this item at %{site}"

captcha:
captcha_settings: "Captcha Settings"
Expand Down

0 comments on commit 8610c6f

Please sign in to comment.