spud_photos 0.9.0 → 0.9.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/spud/admin/photo_albums_controller.rb +1 -1
- data/app/models/spud_photo_album.rb +2 -2
- data/app/models/spud_photo_albums_photo.rb +1 -1
- data/app/models/spud_photo_galleries_album.rb +1 -1
- data/db/migrate/20121127210314_rename_order_to_sort_order.rb +6 -0
- data/lib/spud_photos/version.rb +1 -1
- metadata +5 -4
@@ -57,7 +57,7 @@ class Spud::Admin::PhotoAlbumsController < Spud::Admin::ApplicationController
|
|
57
57
|
@photo_album.spud_photo_albums_photos.each do |obj|
|
58
58
|
logger.debug "##### ID: #{obj.spud_photo_id.to_s}"
|
59
59
|
index = order_ids.index(obj.spud_photo_id.to_s)
|
60
|
-
obj.update_attribute(:
|
60
|
+
obj.update_attribute(:sort_order, index)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
@@ -6,7 +6,7 @@ class SpudPhotoAlbum < ActiveRecord::Base
|
|
6
6
|
has_many :photos,
|
7
7
|
:through => :spud_photo_albums_photos,
|
8
8
|
:source => :spud_photo,
|
9
|
-
:order => 'spud_photo_albums_photos.
|
9
|
+
:order => 'spud_photo_albums_photos.sort_order asc'
|
10
10
|
|
11
11
|
has_many :spud_photo_galleries_albums
|
12
12
|
has_many :galleries,
|
@@ -46,4 +46,4 @@ class SpudPhotoAlbum < ActiveRecord::Base
|
|
46
46
|
# end
|
47
47
|
end
|
48
48
|
|
49
|
-
end
|
49
|
+
end
|
data/lib/spud_photos/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spud_photos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.0
|
4
|
+
version: 0.9.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -251,6 +251,7 @@ files:
|
|
251
251
|
- db/migrate/20120228232329_create_spud_photo_albums.rb
|
252
252
|
- db/migrate/20120228232344_create_spud_photo_galleries.rb
|
253
253
|
- db/migrate/20120405042046_upgrade_photo_relationships.rb
|
254
|
+
- db/migrate/20121127210314_rename_order_to_sort_order.rb
|
254
255
|
- lib/generators/spud/photos/views_generator.rb
|
255
256
|
- lib/responds_to_parent.rb
|
256
257
|
- lib/spud_photos/configuration.rb
|
@@ -275,7 +276,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
275
276
|
version: '0'
|
276
277
|
segments:
|
277
278
|
- 0
|
278
|
-
hash: -
|
279
|
+
hash: -2572235991135577749
|
279
280
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
280
281
|
none: false
|
281
282
|
requirements:
|
@@ -284,7 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
284
285
|
version: '0'
|
285
286
|
segments:
|
286
287
|
- 0
|
287
|
-
hash: -
|
288
|
+
hash: -2572235991135577749
|
288
289
|
requirements: []
|
289
290
|
rubyforge_project:
|
290
291
|
rubygems_version: 1.8.24
|