photo_folder 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,6 +58,9 @@ class PhotoCollection < ActiveRecord::Base
58
58
  PhotoFolder::all_paths_in_database.select{|path| self.path.underscore.gsub(/\s/,'_') == path.gsub(/\/[^\/]+$/,'').underscore.gsub(/\s/,'_')}.each do |path|
59
59
  Photo.update_all("photo_collection_id = #{self.id}","path = '#{path}'")
60
60
  end
61
+ photos.each_with_index do |photo,i|
62
+ photo.insert_at(i + 1)
63
+ end
61
64
  end
62
65
 
63
66
  def set_parent_id
data/lib/photo_folder.rb CHANGED
@@ -178,6 +178,9 @@ module PhotoFolder
178
178
  to_remove.push(path_in_database) if !collection_paths_in_filesystem.include?(path_in_database)
179
179
  end
180
180
 
181
+ #ensure root photo is not marked as a collection
182
+ to_add.reject!{|item| item == 'index.markdown'}
183
+
181
184
  [to_add,to_remove]
182
185
  end
183
186
 
data/photo_folder.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "photo_folder"
3
- s.version = "1.0.7"
3
+ s.version = "1.0.8"
4
4
  s.date = "2010-05-11"
5
5
  s.summary = "JavaScript gallery"
6
6
  s.email = "ryan@syntacticx.com"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: photo_folder
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 7
10
- version: 1.0.7
9
+ - 8
10
+ version: 1.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Johnson