formgen 0.3.1 → 0.3.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{formgen}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Pullmonkey"]
12
- s.date = %q{2011-11-16}
12
+ s.date = %q{2011-11-17}
13
13
  s.description = %q{Ruby on Rails form generator based on has_many and belongs_to associations. Includes the helpers and javascript for adding and removing fields_for form attributes.}
14
14
  s.email = %q{info@skizmo.com}
15
15
  s.extra_rdoc_files = [
@@ -96,7 +96,9 @@ module Skizmo
96
96
  end
97
97
 
98
98
  def have_attachments?
99
- (has_many_classes | belongs_to_classes).each do |kls|
99
+ # check nested and object's own
100
+ return true if attachments_for(cls.to_s.classify.constantize)
101
+ (nested_has_many_classes | nested_belongs_to_classes).each do |kls|
100
102
  return true if attachments_for(kls.to_s.classify.constantize)
101
103
  end
102
104
  return false
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formgen
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pullmonkey
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-16 00:00:00 -07:00
18
+ date: 2011-11-17 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency