ack_rails_admin_jcrop 0.2.0.1 → 0.2.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 698b8b357ba91365e2858740badf4691f29cdeb3
4
- data.tar.gz: 90d7f15e6ee4ef487c687b8dfcca7b194c03cd82
3
+ metadata.gz: 28b4a3cd1239bcbdff7716ba9f1c1de90374d29c
4
+ data.tar.gz: 0e29d0a59be1953b6db4d28adadf8baffb7ad79c
5
5
  SHA512:
6
- metadata.gz: 157a1b1ffc77d37b259a96d35d538b0c439593db9e904d9b5af135d8ef19ad17dc53bf58e13d3e41606e93b08100e45a1e7209d1c2ff18e8bda1daac30951cd1
7
- data.tar.gz: fb3e7f822bd6f05bf5ed58952d596c31ce5f2b9054608653970bd9ec9900b26a1c651583740e7790bf6433a5e7c2de6546b78a582868b09fefea9692e3b669b4
6
+ metadata.gz: 172b5c47ef4fd5101d3f3341d7ed4d80b99841d63bbe037dba86e8201eb3090e9aff350d5cd77b48b20f121dee1b2e8ef1a883e0dfaaa6d2d528b583ad931e6c
7
+ data.tar.gz: fdd0bbd2cb5e15253407f6b0f129b1d65428ec8bc97ab9a54a6ee7ed3fecec0a1c4ba7731ad68f247966897622d7fc99e3f233dcb8b14216b403d317e61ae60c
@@ -16,7 +16,7 @@ module RailsAdminJcrop
16
16
  def crop(obj, field)
17
17
  _field = obj.send(field)
18
18
  _field.reprocess_without_saving_instance
19
-
19
+
20
20
  # _field.reprocess!(*(_field.styles.keys - [:original]))
21
21
  # _field.reprocess_without_saving_instance(*(_field.styles.keys - [:original]))
22
22
  end
@@ -49,9 +49,11 @@ module Paperclip
49
49
  def has_attached_file(*args)
50
50
  super
51
51
  self.attachment_definitions.each do |name, options|
52
- options[:processors] ||= []
53
- options[:processors] << :rails_admin_jcropper
54
- options[:processors].uniq!
52
+ unless options[:processors].is_a?(Proc)
53
+ options[:processors] ||= []
54
+ options[:processors] << :rails_admin_jcropper
55
+ options[:processors].uniq!
56
+ end
55
57
  end
56
58
  end
57
59
  end
@@ -36,6 +36,7 @@ module RailsAdminJcrop
36
36
  # end
37
37
  # end
38
38
  def auto_rails_admin_jcrop(_field_name)
39
+ return if _field_name.nil?
39
40
  if !rails_admin_cropping? and self.try("#{_field_name}_updated_at_changed?") and (_crop_params = self.try("#{_field_name}_default_crop_params"))
40
41
  rails_admin_crop _crop_params
41
42
  end
@@ -1,3 +1,3 @@
1
1
  module RailsAdminJcrop
2
- VERSION = "0.2.0.1"
2
+ VERSION = "0.2.0.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ack_rails_admin_jcrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.1
4
+ version: 0.2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kiseliev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-16 00:00:00.000000000 Z
12
+ date: 2017-01-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails_admin