effective_email_templates 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2b7b2c28fcf4f3db2dcd66a28a8ce10438de029f87e8ef130ba75eb902a8d82
4
- data.tar.gz: 3fa36a8f03b57e2e26a68ad2f8ae0ddf588c34b90ee91e288a8af5e9d9ca16df
3
+ metadata.gz: 46c7c44b667283c6c335d71efd8c146395b621ee28d6f1e50838b6f72d918b91
4
+ data.tar.gz: 43fecd6415a60000d4c9180bddfcba793c38f06920032eefd5d1bf7cba8fc77f
5
5
  SHA512:
6
- metadata.gz: 236ccdc72f1c6d29ca204cb1222f890416fe536ecdf1ee2384cc78562d670940c55bf7a4021cb90bae3224658513d907f509767f1ba8c97044f60c2fe3469250
7
- data.tar.gz: 35d9707d2ba8a1aba3a26501bb5a3c7f632c82e391961d2ad72fd56c39cd4f6e9b41ff29c26299d9ea9f8c33b56b009356171aa73f2cce232ab851216a89e752
6
+ metadata.gz: 516ed7e095f233a13486aed1a766631359b69ff0e7d53437f7f8b7114ef4d73c66f5a2114fa2c624666517256ca328b0f4f3448dcf275730b138b0a01a93bc99
7
+ data.tar.gz: e5ab639194a6a53a66f9e69ab9353f64696ef558aad299d9c63680c6c4c8be8c1629ffd1b7f4f541a55926a84aa0edbc50decadeb6fdd67ddeb538abbc733eed
@@ -34,7 +34,11 @@ module Admin
34
34
  end
35
35
 
36
36
  def edit
37
- @email_template = Effective::EmailTemplate.find(params[:id])
37
+ @email_template =
38
+ Effective::EmailTemplate.where(id: params[:id]).or(
39
+ Effective::EmailTemplate.where(template_name: params[:id])
40
+ ).first!
41
+
38
42
  @page_title = 'Edit Email Template'
39
43
 
40
44
  authorize_effective_email_templates!
@@ -2,6 +2,8 @@ module Effective
2
2
  class EmailTemplate < ActiveRecord::Base
3
3
  self.table_name = EffectiveEmailTemplates.email_templates_table_name.to_s
4
4
 
5
+ log_changes if respond_to?(:log_changes)
6
+
5
7
  CONTENT_TYPES = ['text/plain', 'text/html']
6
8
 
7
9
  # Attributes
@@ -1,6 +1,6 @@
1
1
  = form.fields_for(:email_review, email_review) do |f|
2
2
  = f.hidden_field :template_name
3
- = f.text_area :body, rows: 10
3
+ = f.text_area :body, required: true, rows: 10
4
4
 
5
5
  = collapse('Show / hide email variables') do
6
6
  %p The available variables are:
@@ -1,3 +1,3 @@
1
1
  module EffectiveEmailTemplates
2
- VERSION = '1.0.5'.freeze
2
+ VERSION = '1.0.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_email_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-19 00:00:00.000000000 Z
11
+ date: 2020-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails