Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Address issues pulling in the parking & garden attributes

  • Loading branch information...
commit d90fd8ecd6a0794e4065736b6c297ee19921177c 1 parent 50add37
Mike Fulcher authored

Showing 1 changed file with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. +7 7 lib/vebra/parse.rb
14 lib/vebra/parse.rb
@@ -332,13 +332,13 @@ def customise(hash)
332 332 end
333 333 end
334 334
335   - # was: { :garden => nil }
336   - # now: { :garden => false }
337   - hash[:garden] = !!hash[:garden] if hash.keys.include?(:garden)
338   -
339   - # was: { :parking => nil }
340   - # now: { :parking => false }
341   - hash[:parking] = !!hash[:parking] if hash.keys.include?(:parking)
  335 + # was: { :garden/parking => nil } or: { :garden/parking => 0 }
  336 + # now: { :garden/parking => false }
  337 + [ :parking, :garden ].each do |key|
  338 + if hash.keys.include?(key)
  339 + hash[key] = hash[key].present? && hash[key].to_i != 0
  340 + end
  341 + end
342 342
343 343 hash
344 344 end

0 comments on commit d90fd8e

Please sign in to comment.
Something went wrong with that request. Please try again.