garden 0.0.7.pre → 0.0.8.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -78,15 +78,24 @@ module Garden
78
78
 
79
79
  if @object.valid?
80
80
  @object.save!
81
- puts ".Saved instance: #{@clazz} #{@object.to_param}"
81
+
82
+ # attributes.each do |key, value|
83
+ # if reflection = reflection_for(key)
84
+ # value.save!
85
+ # end
86
+ # end
87
+
88
+
89
+
90
+ puts ". Saved instance: #{@clazz} #{@object.to_param}"
82
91
  else
83
- puts "Invalid instance."
84
- puts "#{@name}:"
92
+ puts "! Invalid instance: #{@object.to_param}"
93
+ # puts "#{@name}:"
85
94
  # puts " - Valid attributes: #{attributes.keys}"
86
95
  # puts " - Excel sheet keys: #{all_keys}"
87
96
  # puts " - Invalid attributes: #{rejected.keys}"
88
97
  # puts " - Association attributes: #{relationships}"
89
- puts "Attributes from excel: #{attributes}"
98
+ # puts "Attributes from excel: #{attributes}"
90
99
  # @object.errors.each do |error|
91
100
  # puts "Error => #{error}: #{@object.errors.get error}"
92
101
  # end
@@ -130,6 +139,15 @@ module Garden
130
139
  end
131
140
 
132
141
  @object.send "#{key}=", value
142
+
143
+ return
144
+ end
145
+
146
+
147
+ if @object.respond_to?(key.to_sym)
148
+ puts "Ok. #{key}"
149
+ @object.send "#{key}=", value
150
+ return
133
151
  end
134
152
 
135
153
  end
@@ -1,3 +1,3 @@
1
1
  module Garden
2
- VERSION = "0.0.7.pre"
2
+ VERSION = "0.0.8.pre"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: garden
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7.pre
4
+ version: 0.0.8.pre
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-05 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spreadsheet
16
- requirement: &70279663028260 !ruby/object:Gem::Requirement
16
+ requirement: &70178654858180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70279663028260
24
+ version_requirements: *70178654858180
25
25
  description: ! 'Allows you to organize your seeds in different formats. Typical seeds.rb,
26
26
  yaml fixtures, and a variety of spreadsheet formats. '
27
27
  email: