Permalink
Browse files

Update example with ability to persist

  • Loading branch information...
1 parent bc31db1 commit f68b790174a0208496d6acba5bc89e720e740129 @nesquena committed May 20, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 example.rb
View
@@ -7,7 +7,7 @@ class GradeMapper < SheetMapper::Base
columns :topic, :grade, :score
def valid_row?
- self[:topic].present? && @pos > 3
+ self[:topic].present? && @pos > 4
end
# Convert is_notable to boolean
@@ -28,3 +28,9 @@ def score
p bubble.attributes # => { :topic => "...", :grade => "...", :score => "..." }
end
+b = collection.records[1]
+b[:grade] = "B"
+b[:score] = 86
+
+collection.save
+

0 comments on commit f68b790

Please sign in to comment.