ish_manager 0.1.8.77 → 0.1.8.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 727cd1054398ab97784afdccfcd901616a61a14f
|
4
|
+
data.tar.gz: d9c45653a09e289306f12e3b59ff426cc6add7eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d7f7ba347e43245d06b00456eb40b1d54db209d32ec82dc9ed540d06121c5d249646ca738cf19afc97f0e8b6698fc28efc99d14f1992bfb44b667812abf14e9
|
7
|
+
data.tar.gz: 43b4aac87e9ebf5378d740528bf34d6e45dd235dcf46c4265c2573b24db0b965f4e5f72b26c670481547c90eaeb35956c17f8d1bb0b23e5f13faf77928e8aa5a
|
@@ -30,6 +30,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def create
|
33
|
+
params[:gallery][:shared_profiles] ||= []
|
33
34
|
params[:gallery][:shared_profiles].delete('')
|
34
35
|
params[:gallery][:shared_profiles] = IshModels::UserProfile.find params[:gallery][:shared_profiles]
|
35
36
|
@gallery = Gallery.new params[:gallery].permit!
|
@@ -38,10 +39,11 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
38
39
|
authorize! :create, @gallery
|
39
40
|
|
40
41
|
if @gallery.save
|
41
|
-
|
42
|
+
::IshManager::ApplicationMailer.shared_galleries( params[:gallery][:shared_profiles], @gallery ).deliver
|
42
43
|
flash[:notice] = 'Success'
|
43
44
|
redirect_to galleries_path
|
44
45
|
else
|
46
|
+
puts! @gallery.errors.messages
|
45
47
|
flash[:error] = 'No Luck. ' + @gallery.errors.inspect
|
46
48
|
@cities_list = City.list
|
47
49
|
@tags_list = Tag.list
|
@@ -58,11 +60,12 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
58
60
|
@gallery = Gallery.unscoped.find params[:id]
|
59
61
|
old_shared_profile_ids = @gallery.shared_profiles.map(&:id)
|
60
62
|
authorize! :update, @gallery
|
63
|
+
params[:gallery][:shared_profiles] ||= []
|
61
64
|
params[:gallery][:shared_profiles].delete('')
|
62
65
|
params[:gallery][:shared_profiles] = IshModels::UserProfile.find params[:gallery][:shared_profiles]
|
63
66
|
if @gallery.update_attributes( params[:gallery].permit! )
|
64
67
|
new_shared_profiles = params[:gallery][:shared_profiles].select { |p| !old_shared_profile_ids.include?( p.id ) }
|
65
|
-
IshManager::ApplicationMailer.shared_galleries( new_shared_profiles, @gallery ).deliver
|
68
|
+
::IshManager::ApplicationMailer.shared_galleries( new_shared_profiles, @gallery ).deliver
|
66
69
|
flash[:notice] = 'Success.'
|
67
70
|
redirect_to galleries_path
|
68
71
|
else
|
@@ -15,11 +15,12 @@ module IshManager
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def shared_galleries profiles, gallery
|
18
|
+
return if profiles.count == 0
|
18
19
|
@gallery = gallery
|
19
20
|
@domain = Rails.application.config.action_mailer.default_url_options[:host]
|
20
21
|
@galleries_path = IshManager::Engine.routes.url_helpers.galleries_path
|
21
22
|
@gallery_path = IshManager::Engine.routes.url_helpers.gallery_path(@gallery.galleryname)
|
22
|
-
mail( :to => '
|
23
|
+
mail( :to => '314658@gmail.com',
|
23
24
|
:bcc => profiles.map { |p| p.email },
|
24
25
|
:subject => 'You got new shared galleries on pi manager' ).deliver
|
25
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.78
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|