Skip to content

Instantly share code, notes, and snippets.

@rtgibbons
Created February 17, 2010 21:40
Show Gist options
  • Save rtgibbons/307034 to your computer and use it in GitHub Desktop.
Save rtgibbons/307034 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 && (location.phone.starts_with?("713") || location.phone.starts_with?("281") || location.phone.starts_with?("972") || location.phone.starts_with?("214") || location.phone.starts_with?("469") || location.phone.starts_with?("817"))
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