Sha256: f154f0bde654f2b7e5b76c2d922ceb4303da752a778d8ce7b42ed98d69f9d899

Contents?: true

Size: 572 Bytes

Versions: 5

Compression:

Stored size: 572 Bytes

Contents

module AlchemyCrm
  class MailingsController < AlchemyCrm::BaseController

    def show
      @mailing = Mailing.find_by_sha1(params[:m])
      if @mailing.nil? && !params[:id].blank?
        @mailing = Mailing.find(params[:id])
      end
      @page = @mailing.page
      if params[:r].present?
        @recipient = @mailing.recipients.find_by_sha1(params[:r])
        @contact = @recipient.contact || Contact.new_from_recipient(@recipient)
      else
        @contact = Contact.fake
        @recipient = Recipient.new_from_contact(@contact)
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alchemy_crm-2.0.5 app/controllers/alchemy_crm/mailings_controller.rb
alchemy_crm-2.0.4.1 app/controllers/alchemy_crm/mailings_controller.rb
alchemy_crm-2.1.0a app/controllers/alchemy_crm/mailings_controller.rb
alchemy_crm-2.0.3 app/controllers/alchemy_crm/mailings_controller.rb
alchemy_crm-2.0.2 app/controllers/alchemy_crm/mailings_controller.rb