Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Address issues pulling in the parking & garden attributes

  • Loading branch information...
commit d90fd8ecd6a0794e4065736b6c297ee19921177c 1 parent 50add37
Mike Fulcher authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/vebra/parse.rb
View
14 lib/vebra/parse.rb
@@ -332,13 +332,13 @@ def customise(hash)
end
end
- # was: { :garden => nil }
- # now: { :garden => false }
- hash[:garden] = !!hash[:garden] if hash.keys.include?(:garden)
-
- # was: { :parking => nil }
- # now: { :parking => false }
- hash[:parking] = !!hash[:parking] if hash.keys.include?(:parking)
+ # was: { :garden/parking => nil } or: { :garden/parking => 0 }
+ # now: { :garden/parking => false }
+ [ :parking, :garden ].each do |key|
+ if hash.keys.include?(key)
+ hash[key] = hash[key].present? && hash[key].to_i != 0
+ end
+ end
hash
end
Please sign in to comment.
Something went wrong with that request. Please try again.