Skip to content

Instantly share code, notes, and snippets.

@bwiggs
Forked from rtgibbons/areacode.rb
Created February 17, 2010 21:44
Show Gist options
  • Save bwiggs/307041 to your computer and use it in GitHub Desktop.
Save bwiggs/307041 to your computer and use it in GitHub Desktop.
desc %{ Renders the contained block if online ordering is true}
tag 'location:ordering' do |tag|
location = tag.locals.location
if location.phone && %w(713 281 972 214 469 817).detect { |area_code| location.phone.start_with? area_code}
tag.expand
elsif location.title && (location.title == "San Jacinto" || location.title == "Preston Forest")
tag.expand
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment