Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # show all zipcodes from all ziplocations that belong to a user in a single array ["11111", "22222"]
- def services_zipcode(zip)
- self.ziplocations.collect{|zl| zl.zipcodes}.flatten.uniq.compact.collect{|zc| zc.zip}.include?(zip)
- end
Add Comment
Please, Sign In to add comment