lalala 4.0.0.dev.132 → 4.0.0.dev.133

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: dc1ae17de6d849cc566a4dea2b5e7285e7c55a76
4
- data.tar.gz: 483ce30c92bc399e37e9c0ae375612d4dd0a33bf
3
+ metadata.gz: 6329301663edfc88e1b14baea18850d1796b06ac
4
+ data.tar.gz: 2d6c046c1452ae601c8a0a4eb1c6f4237c53ada2
5
5
  SHA512:
6
- metadata.gz: 35f72b7546f8f5655644a4eddf0733c12f650f3af66e8b08549b7b3b5b0b17c4986531bc35f7c645f6fcdb0f89d2fbe06c45b9eb96939c225c330fcf1181e7f0
7
- data.tar.gz: 2414f42bbfc87cc48ba422343031b9bb726263b76d7a8d7eaf0a06d86ae578cea6d08142cc078cb97a9caa3630c168ce5475762f8b1c29b8bc6b8d4678559942
6
+ metadata.gz: f6e326d7b28ec3dfe25e908dd9539abe3ac2a4e85b31ad907720fd665df84bd361692168eda21c053e8d66591d9871f5f235faaede5949febd88bedc3e294463
7
+ data.tar.gz: b952b456028c79d336d6a0f475dbe81d97c8463025a978615b8c04bb0afd7f65499b3c3ec1ddcd5c1c39a4cfe54d1787e2e8d053bc212fbaa47a0eedded32905
@@ -11,10 +11,13 @@ class Formtastic::Inputs::GridInput
11
11
 
12
12
  ul = template.content_tag :ul do
13
13
  html = template.raw("")
14
+ asset_errors = []
14
15
 
15
16
  assets.each_with_index do |asset, idx|
16
17
  html += template.content_tag :li, class: "asset" do
17
18
  builder.fields_for(method, asset) do |f|
19
+ asset_errors.concat(asset.errors.to_a)
20
+
18
21
  lalala_thumb = f.object.asset.lalala_thumb
19
22
 
20
23
  if url = lalala_thumb.try(:url)
@@ -34,11 +37,24 @@ class Formtastic::Inputs::GridInput
34
37
  :a, template.raw("✕"), class: "close-button"
35
38
  )
36
39
  end
40
+
37
41
  asset_html
38
42
  end
39
43
  end
40
44
  end
41
45
 
46
+ if asset_errors.present?
47
+ html += template.content_tag :li, class: "errors" do
48
+ template.content_tag :ul do
49
+ errors_html = template.raw("")
50
+ asset_errors.each do |error|
51
+ errors_html += template.content_tag(:li, error)
52
+ end
53
+ errors_html
54
+ end
55
+ end
56
+ end
57
+
42
58
  html += template.content_tag :li do
43
59
  builder.fields_for(method, assets.build) do |f|
44
60
  f.file_field :asset, multiple: true, accept: asset_model_class.extension_white_list
@@ -1,8 +1,6 @@
1
1
  class Lalala::Uploaders::Image < Lalala::Uploaders::File
2
2
 
3
3
  include CarrierWave::MiniMagick
4
- include Sprockets::Helpers::RailsHelper
5
- include Sprockets::Helpers::IsolatedHelper
6
4
 
7
5
  def extension_white_list
8
6
  %w(jpg jpeg gif png)
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.0.0"
3
- BUILD = "132"
3
+ BUILD = "133"
4
4
 
5
5
  if BUILD != ("{{BUILD_NUMBER" + "}}") # prevent sed replacement (see script/ci)
6
6
  BUILD_VERSION = "#{VERSION}.dev.#{BUILD}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lalala
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.dev.132
4
+ version: 4.0.0.dev.133
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Menke