ish_models 0.0.33.231 → 0.0.33.232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ish/email_campaign.rb +9 -12
- data/lib/ish/email_context.rb +2 -0
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 7779f5792082964493be63e188d2d488abfed178cdecb64b1f0e288643b6af60
         | 
| 4 | 
            +
              data.tar.gz: 47b175252e94a3b59c947ebd09b363fc62178f37f29a837a3ed75d95a6233943
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 5dc4593e03760dea3a5ba96805ba7143c4c7fe6881a59b7e5498ebb1e1e3d00ddf09e6111d2103f703902bd38f7466710b1e24c8dbf7922cd5ff8c31c73332aa
         | 
| 7 | 
            +
              data.tar.gz: 0c289c198d33ac678dfdc2ea3b5a4ec1d9fefb2f79ac69d123a02577b4c9d6bce4221578b097714e5d3ffb4981d6f5a3f1e503e6acae13b06d54bcb827589093
         | 
    
        data/lib/ish/email_campaign.rb
    CHANGED
    
    | @@ -7,30 +7,27 @@ | |
| 7 7 | 
             
            class Ish::EmailCampaign
         | 
| 8 8 | 
             
              include Mongoid::Document
         | 
| 9 9 | 
             
              include Mongoid::Timestamps
         | 
| 10 | 
            +
              store_in collection: 'ish_email_campaigns'
         | 
| 10 11 |  | 
| 11 | 
            -
              field : | 
| 12 | 
            -
               | 
| 13 | 
            -
                title
         | 
| 14 | 
            -
              end
         | 
| 12 | 
            +
              field :slug
         | 
| 13 | 
            +
              validates_uniqueness_of :slug, allow_nil: true
         | 
| 15 14 |  | 
| 16 15 | 
             
              PAGE_PARAM_NAME = 'email_contexts_page'
         | 
| 17 16 |  | 
| 18 | 
            -
              FROM_EMAILS = %w| | 
| 19 | 
            -
                piousbox@gmail.com hello@piousbox.com | 
| 20 | 
            -
                admin@wasya.co | 
| 17 | 
            +
              FROM_EMAILS = %w|    hello@infiniteshelter.com no-reply@infiniteshelter.com
         | 
| 18 | 
            +
                piousbox@gmail.com hello@piousbox.com        no-reply@piousbox.com        victor@piousbox.com
         | 
| 19 | 
            +
                admin@wasya.co     hello@wasya.co            no-reply@wasya.co            victor@wasya.co |
         | 
| 21 20 | 
             
              field :from_email
         | 
| 22 21 | 
             
              validates_presence_of :from_email
         | 
| 23 22 | 
             
              def self.from_email_list
         | 
| 24 23 | 
             
                [ [nil, nil] ] + FROM_EMAILS.map { |i| [i, i] }
         | 
| 25 24 | 
             
              end
         | 
| 26 25 |  | 
| 27 | 
            -
               | 
| 28 | 
            -
               | 
| 26 | 
            +
              belongs_to :email_template
         | 
| 27 | 
            +
              def tmpl; email_template; end
         | 
| 29 28 |  | 
| 29 | 
            +
              field :subject
         | 
| 30 30 | 
             
              field :body
         | 
| 31 | 
            -
              # validates_presence_of :body
         | 
| 32 | 
            -
             | 
| 33 | 
            -
              belongs_to :email_template
         | 
| 34 31 |  | 
| 35 32 | 
             
              field :sent_at, type: DateTime
         | 
| 36 33 | 
             
              field :send_at, type: DateTime
         | 
    
        data/lib/ish/email_context.rb
    CHANGED
    
    | @@ -43,6 +43,8 @@ class ::Ish::EmailContext | |
| 43 43 | 
             
              belongs_to :scheduled_email_action, class_name: '::Office::ScheduledEmailAction', optional: true
         | 
| 44 44 | 
             
              def sch; scheduled_email_action; end
         | 
| 45 45 |  | 
| 46 | 
            +
              belongs_to :email_campaign, class_name: 'Ish::EmailCampaign', optional: true
         | 
| 47 | 
            +
             | 
| 46 48 | 
             
              field :rendered_str
         | 
| 47 49 |  | 
| 48 50 | 
             
              field :sent_at, type: DateTime
         |