formgen 0.3.0 → 0.3.1

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/README.rdoc CHANGED
@@ -184,6 +184,15 @@ Based on Foo example above.
184
184
 
185
185
  Make sure the generated helper is being loaded - restart your rails server.
186
186
 
187
+ * I want haml templates instead of erb:
188
+
189
+ Done - just include this gem https://github.com/indirect/haml-rails
190
+
191
+ == Gotchas
192
+
193
+ * Only does single level nesting at this point. For example, if the Bar or Baz class had accepts_nested_attributes_for :thing, it would not generate those partials and form elements. Yet. This is the only thing on my TODO list before I'd call it a solid 1.0.0.
194
+ * You need to use yield :head somewhere in your layout to take advantage of the jQuery that is loaded in a content_for :head to supply add and remove jQuery.
195
+
187
196
 
188
197
  == Contributing to formgen
189
198
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/formgen.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{formgen}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Pullmonkey"]
@@ -30,6 +30,8 @@ module Skizmo
30
30
  template "_nested_fields.html.#{engine}", "app/views/#{file_name.pluralize}/_#{@sym.to_s.singularize}_fields.html.#{engine}"
31
31
  end
32
32
  end
33
+
34
+ # TODO multi-level nesting
33
35
 
34
36
  private
35
37
 
@@ -1,4 +1,4 @@
1
- <% if options.helpers? -%>
1
+ <% if options.helpers? and !nested_classes_with_attributes.empty? -%>
2
2
  <%%= form_for setup_<%= cls_underscore %>(@<%= cls.to_s.underscore %>)<%= @have_attachment_string %> do |f| %>
3
3
  <% else -%>
4
4
  <%%= form_for @<%= cls.to_s.underscore %><%= @have_attachment_string %> do |f| %>
@@ -1,4 +1,4 @@
1
- <% if options.helpers? -%>
1
+ <% if options.helpers? and !nested_classes_with_attributes.empty? -%>
2
2
  = form_for setup_<%= cls_underscore %>(@<%= cls.to_s.underscore %>)<%= @have_attachment_string %> do |f|
3
3
  <% else -%>
4
4
  = form_for @<%= cls.to_s.underscore %><%= @have_attachment_string %> do |f|
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pullmonkey