Skip to content

Instantly share code, notes, and snippets.

@benheb
Created July 24, 2012 16:17
Show Gist options
  • Save benheb/3170981 to your computer and use it in GitHub Desktop.
Save benheb/3170981 to your computer and use it in GitHub Desktop.
<% @overlay = Overlay.find(params[:id])
@activities = Search.execute("", :tag => "project:#{@overlay.id}").results
gallery_images_dir = File.dirname("public/"+image_path("icon.marker.blue.png")) + "/gallery/" + @overlay.title.downcase + "/"
@images =[]
if File.exist?(gallery_images_dir)
Dir.chdir(gallery_images_dir) do
@images = Dir.glob("*.{jpg,png,jpeg,gif}")
end
end
project_name = @overlay.title.downcase
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment