my_forum 0.0.1.beta17 → 0.0.1.beta18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/my_forum/admin/mail_controller.rb +26 -0
- data/app/mailers/my_forum/user_mailer.rb +5 -0
- data/app/views/layouts/my_forum/admin_application.haml +1 -0
- data/app/views/my_forum/admin/mail/index.haml +9 -0
- data/app/views/my_forum/user_mailer/custom_email.text.erb +1 -0
- data/config/routes.rb +1 -0
- data/lib/my_forum/version.rb +1 -1
- data/spec/controllers/my_forum/admin/mail_controller_spec.rb +7 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5514c53da96410d98cfc5924939be182c7642fcf
|
4
|
+
data.tar.gz: cab1bed9170f717fe9362ba9a19191dffe0c1542
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e48abf56b44da7dc752c0e41da1cfa2fd1cde60e3d0d5008fd71e74d747cdc5a6b7392dda56ac3646b2400a6fe40756f244396ff05ed2ff6ca0feed70c67a57
|
7
|
+
data.tar.gz: b10df2275cb6a7f470040ae32cd74f28f2dc6c864922ca0e3985e664b4d7c544d84ddfdb61faf96371158f99e8fe19b1c6d58739fc948855683800de5bfdf4bc
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_dependency "my_forum/application_controller"
|
2
|
+
|
3
|
+
module MyForum
|
4
|
+
class Admin::MailController < ApplicationController
|
5
|
+
before_filter :verify_admin
|
6
|
+
|
7
|
+
layout 'layouts/my_forum/admin_application'
|
8
|
+
|
9
|
+
def index
|
10
|
+
if request.post?
|
11
|
+
send_mails(params[:emails], params[:subject], params[:message]) unless params[:emails].blank?
|
12
|
+
redirect_to admin_mail_list_path
|
13
|
+
else
|
14
|
+
@users = User.all.map{ |u| [u.login, u.email]}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def send_mails(email_list, subject, message)
|
21
|
+
email_list.each do |mail|
|
22
|
+
UserMailer.custom_email(email: mail, subject: subject, message: message).deliver_now
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= @message %>
|
data/config/routes.rb
CHANGED
data/lib/my_forum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_forum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.beta18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vitaly Omelchenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -185,6 +185,7 @@ files:
|
|
185
185
|
- app/controllers/my_forum/admin/categories_controller.rb
|
186
186
|
- app/controllers/my_forum/admin/dashboard_controller.rb
|
187
187
|
- app/controllers/my_forum/admin/forums_controller.rb
|
188
|
+
- app/controllers/my_forum/admin/mail_controller.rb
|
188
189
|
- app/controllers/my_forum/admin/roles_controller.rb
|
189
190
|
- app/controllers/my_forum/admin/users_controller.rb
|
190
191
|
- app/controllers/my_forum/application_controller.rb
|
@@ -235,6 +236,7 @@ files:
|
|
235
236
|
- app/views/my_forum/admin/dashboard/index.haml
|
236
237
|
- app/views/my_forum/admin/forums/index.haml
|
237
238
|
- app/views/my_forum/admin/forums/new.haml
|
239
|
+
- app/views/my_forum/admin/mail/index.haml
|
238
240
|
- app/views/my_forum/admin/roles/index.haml
|
239
241
|
- app/views/my_forum/admin/roles/new.haml
|
240
242
|
- app/views/my_forum/admin/users/index.haml
|
@@ -250,6 +252,7 @@ files:
|
|
250
252
|
- app/views/my_forum/topics/_user_info.haml
|
251
253
|
- app/views/my_forum/topics/new.haml
|
252
254
|
- app/views/my_forum/topics/show.haml
|
255
|
+
- app/views/my_forum/user_mailer/custom_email.text.erb
|
253
256
|
- app/views/my_forum/user_mailer/reset_password_email.haml
|
254
257
|
- app/views/my_forum/user_mailer/reset_password_email.text.erb
|
255
258
|
- app/views/my_forum/users/edit.haml
|
@@ -279,6 +282,7 @@ files:
|
|
279
282
|
- lib/my_forum/engine.rb
|
280
283
|
- lib/my_forum/version.rb
|
281
284
|
- lib/tasks/my_forum_tasks.rake
|
285
|
+
- spec/controllers/my_forum/admin/mail_controller_spec.rb
|
282
286
|
- spec/controllers/my_forum/private_messages_controller_spec.rb
|
283
287
|
- spec/controllers/my_forum/users_controller_spec.rb
|
284
288
|
- spec/dummy/README.rdoc
|
@@ -348,6 +352,7 @@ signing_key:
|
|
348
352
|
specification_version: 4
|
349
353
|
summary: Simple Forum
|
350
354
|
test_files:
|
355
|
+
- spec/controllers/my_forum/admin/mail_controller_spec.rb
|
351
356
|
- spec/controllers/my_forum/private_messages_controller_spec.rb
|
352
357
|
- spec/controllers/my_forum/users_controller_spec.rb
|
353
358
|
- spec/dummy/app/assets/javascripts/application.js
|