rails_core_extensions 0.13.0 → 0.13.1

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: 2b1eb7cf498a2e96bf6b76cf957ae9f1e3a9bd98dfe3a295a993614b2d6c964b
4
- data.tar.gz: 833f7a348a0df83860057188a63d7c8a0b7b41165e772440bdf806cfdd3ff244
3
+ metadata.gz: ccc0583ffb6264c6f3a3c4ec35caf8028c263dc37403eae6417a2e2a398b01c9
4
+ data.tar.gz: e332a69c6ed44ab4cec2f12608a0af873ab799d6f7274f818ab9c211eff05ee2
5
5
  SHA512:
6
- metadata.gz: 220a9b391ae6601bd5e6b3163dba1c1ea3a93a80ec5790421777e0905ed2fffd0932f6f2f66fed51f4be93fe3882737494d55ca779e65de4149f1008b5651a80
7
- data.tar.gz: 3f77384f933a2565f0e043fae0afc6444016f1468a7b53ad46de3e5c89d8d3620dd1273a3453ff3e21c43c7326ab10f50759bf4ea31d3610e57dd0295a78120c
6
+ metadata.gz: c73627135e3553892c98facf3071f2599db2f222d0c35e9b8fa9a0f372fa3f40dbdf10f42ccfc2d5df20fa37ae6136aba5199c98e8ef093f406989d16dd23443
7
+ data.tar.gz: 634791e2c66ab5972318a1a8f44c15ba00dd6257ae7110487c56ca2f9c8406dcf779c94558606242923ec626541486aa0bfe53913fb2cdc28cf3a9ba8422bdcd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.1
4
+
5
+ - [PLAT-384] Fix the liquid extension
6
+
3
7
  ## 0.13.0
4
8
 
5
9
  - [PLAT-378] Improve bundler startup time; Drop Concurrency
@@ -1,30 +1,30 @@
1
1
  module RailsCoreExtensions
2
2
  module ActiveRecordLiquidExtensions
3
3
  extend ActiveSupport::Concern
4
- end
5
4
 
6
- module ClassMethods
7
- def validates_liquid(field)
8
- field = field.to_sym
9
- before_validation do |record|
10
- begin
11
- Liquid::Template.parse(record.send(field), error_mode: :strict)
12
- rescue Liquid::SyntaxError => e
13
- record.errors.add(field, "Liquid Syntax Error: #{e}")
5
+ module ClassMethods
6
+ def validates_liquid(field)
7
+ field = field.to_sym
8
+ before_validation do |record|
9
+ begin
10
+ Liquid::Template.parse(record.send(field), error_mode: :strict)
11
+ rescue Liquid::SyntaxError => e
12
+ record.errors.add(field, "Liquid Syntax Error: #{e}")
13
+ end
14
14
  end
15
15
  end
16
- end
17
16
 
18
- def liquid_field(field)
19
- class_eval <<-CODE
20
- def parsed_#{field}
21
- Liquid::Template.parse(#{field})
22
- end
17
+ def liquid_field(field)
18
+ class_eval <<-CODE
19
+ def parsed_#{field}
20
+ Liquid::Template.parse(#{field})
21
+ end
23
22
 
24
- def render_#{field}(*args)
25
- parsed_#{field}.render!(*args)
26
- end
27
- CODE
23
+ def render_#{field}(*args)
24
+ parsed_#{field}.render!(*args)
25
+ end
26
+ CODE
27
+ end
28
28
  end
29
29
  end
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module RailsCoreExtensions
2
- VERSION = '0.13.0'
2
+ VERSION = '0.13.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_core_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Noack
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-07-02 00:00:00.000000000 Z
12
+ date: 2022-07-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord