awesome_nested_fields 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module AwesomeNestedFields
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -37,9 +37,12 @@ protected
37
37
  end
38
38
 
39
39
  if options[:show_empty]
40
- template = @template.content_tag(:script, type: 'text/html', class: options[:empty_template_class], &block)
41
- template = AwesomeNestedFields.escape_html_tags(template) if options[:escape_template]
42
- templates << template
40
+ empty_template = @template.content_tag(:script, type: 'text/html', class: options[:empty_template_class]) do
41
+ template = @template.capture { yield nil }
42
+ template = AwesomeNestedFields.escape_html_tags(template) if options[:escape_template]
43
+ template
44
+ end
45
+ templates.safe_concat empty_template
43
46
  end
44
47
 
45
48
  templates
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awesome_nested_fields
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-26 00:00:00.000000000 -03:00
12
+ date: 2011-07-29 00:00:00.000000000 -03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
- requirement: &2156094920 !ruby/object:Gem::Requirement
17
+ requirement: &2153208860 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.0.0
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *2156094920
25
+ version_requirements: *2153208860
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rails
28
- requirement: &2156094260 !ruby/object:Gem::Requirement
28
+ requirement: &2153208320 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: 3.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2156094260
36
+ version_requirements: *2153208320
37
37
  description: Awesome dynamic nested fields for Rails and jQuery
38
38
  email: lailson@guava.com.br
39
39
  executables: []