ish_manager 0.1.8.100 → 0.1.8.101
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ish_manager/galleries_controller.rb +9 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a92da3273aeaf696648548a1780167efa911a32e
|
4
|
+
data.tar.gz: b0e27b11b02f998817e1b608efdc15791913dd94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ef497505cd027fa15196eadf59ba3f9894f1686c5c0b658971d6070568644b54a319e956a1be4d79c2e0babc1735bf27128990d179c3f71ec69f255af94c4fb
|
7
|
+
data.tar.gz: 7c7938f31ce94aa1fa2d0dcaf4aad34608bc665e267622fc74c4488a8552e91c6b0d40469d15570192a266914407dace61def55f9913a4c073be733d47e6c1ba
|
@@ -72,7 +72,10 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
72
72
|
|
73
73
|
# puts! params[:gallery][:shared_profiles], 'shared profiles'
|
74
74
|
if @gallery.update_attributes( params[:gallery].permit! )
|
75
|
-
new_shared_profiles = params[:gallery][:
|
75
|
+
new_shared_profiles = IshModels::UserProfile.find( params[:gallery][:shared_profile_ids]
|
76
|
+
).select do |p|
|
77
|
+
!old_shared_profile_ids.include?( p.id )
|
78
|
+
end
|
76
79
|
::IshManager::ApplicationMailer.shared_galleries( new_shared_profiles, @gallery ).deliver
|
77
80
|
flash[:notice] = 'Success.'
|
78
81
|
redirect_to galleries_path
|
@@ -84,7 +87,11 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
84
87
|
end
|
85
88
|
|
86
89
|
def show
|
87
|
-
|
90
|
+
begin
|
91
|
+
@gallery = Gallery.unscoped.find_by :galleryname => params[:id]
|
92
|
+
rescue
|
93
|
+
@gallery = Gallery.unscoped.find params[:id]
|
94
|
+
end
|
88
95
|
authorize! :show, @gallery
|
89
96
|
@photos = @gallery.photos.unscoped.where({ :is_trash => false })
|
90
97
|
end
|