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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7927a56b932a124dc6b2e30beb13003c1879e318
4
- data.tar.gz: df132c80844e825276654b6ff27ad8d2b5e5e5fd
3
+ metadata.gz: a92da3273aeaf696648548a1780167efa911a32e
4
+ data.tar.gz: b0e27b11b02f998817e1b608efdc15791913dd94
5
5
  SHA512:
6
- metadata.gz: 7a117470a7705ff92c00b3b4a3b89267fdf11fc5641e4f30e9e07a440d786dd039675100a6ada0560be2a4cdef50fb594cc5b27cbc55942c847e7977f379e86b
7
- data.tar.gz: 7d5795c1695e526f12efbd57cca6591045cc7c837a716183efd9d918c877a9a2e4193213f953cca7c8d432334d42f981a93305c2b7a66b09b5dfd162d14420a3
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][:shared_profiles].select { |p| !old_shared_profile_ids.include?( p.id ) }
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
- @gallery = Gallery.unscoped.find_by :galleryname => params[:id]
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.100
4
+ version: 0.1.8.101
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox