Sha256: 32613382cabdef649d906974e91147a4d7cf582f95cdc0db8a14c31c6cbd36d7

Contents?: true

Size: 468 Bytes

Versions: 8

Compression:

Stored size: 468 Bytes

Contents

module C80Contest
  module MailerHelper
    def format_message(bid)

      # noinspection RubyResolve
      m = Setting.first.message_text

      tmp = m.gsub!('{title}',bid.title)
      m = tmp unless tmp.nil?

      tmp = m.gsub!('{phone}',bid.phone)
      m = tmp unless tmp.nil?

      tmp = m.gsub!('{bid_id}',bid.id.to_s)
      m = tmp unless tmp.nil?

      tmp = m.gsub!('{photo_url}',bid.photo.url.to_s)
      m = tmp unless tmp.nil?
      m
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
c80_contest-0.1.9 app/helpers/c80_contest/mailer_helper.rb
c80_contest-0.1.8 app/helpers/c80_contest/mailer_helper.rb
c80_contest-0.1.7 app/helpers/c80_contest/mailer_helper.rb
c80_contest-0.1.6 app/helpers/c80_contest/mailer_helper.rb
c80_contest-0.1.5 app/helpers/c80_contest/mailer_helper.rb
c80_contest-0.1.4 app/helpers/c80_contest/mailer_helper.rb
c80_contest-0.1.3 app/helpers/c80_contest/mailer_helper.rb
c80_contest-0.1.2 app/helpers/c80_contest/mailer_helper.rb