zoo-generators 0.1.1 → 0.1.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.
@@ -58,13 +58,16 @@ module Zoo
58
58
  @model_attributes << Rails::Generators::GeneratedAttribute.new(column.name.to_s, column.type.to_s)
59
59
  end
60
60
  else
61
- @model_attributes << Rails::Generators::GeneratedAttribute.new('name', 'string')
61
+ klass = class_name.new
62
+ klass.attributes.each do
63
+ @model_attributes << Rails::Generators::GeneratedAttribute.new(column.name.to_s, column.type.to_s)
64
+ end
62
65
  end
63
66
  end
64
67
  end
65
68
 
66
69
  def add_gems
67
- add_gem "haml-rails"
70
+ add_gem "haml-rails"
68
71
  add_gem "formtastic"
69
72
  add_gem "mocha", group: :test
70
73
  end
@@ -1,9 +1,7 @@
1
1
  = semantic_form_for <%= item_path instance_variable: true %> do |f|
2
2
  = f.error_messages
3
3
  <%- for attribute in model_attributes -%>
4
- .field
5
- = f.inputs do
6
- =f.input :<%= attribute.name %>
4
+ = f.inputs do
5
+ =f.input :<%= attribute.name %>
7
6
  <%- end -%>
8
- .actions
9
- = f.submit
7
+ = f.submit
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: zoo-generators
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mikael Henriksson
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-07 00:00:00 +02:00
13
+ date: 2011-05-08 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency