From 05306c849ade1238579c9ae466c3323a738827e8 Mon Sep 17 00:00:00 2001 From: Evandro Magalhaes Leite Junior - SUPDE/DEPAE/DE009 <93274300500@serpro-1553624.(none)> Date: Tue, 13 May 2014 18:17:19 -0300 Subject: [PATCH] code cleaned --- config/plugins/email_article | 1 + plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb | 17 ----------------- 2 files changed, 1 insertion(+), 17 deletions(-) create mode 120000 config/plugins/email_article diff --git a/config/plugins/email_article b/config/plugins/email_article new file mode 120000 index 0000000..e431db0 --- /dev/null +++ b/config/plugins/email_article @@ -0,0 +1 @@ +/home/93274300500/projetos/noosfero/plugins/email_article \ No newline at end of file diff --git a/plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb b/plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb index 04c77a6..37350fc 100644 --- a/plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb +++ b/plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb @@ -4,41 +4,24 @@ class EmailArticlePluginMyprofileController < MyProfileController # before_filter :check_access_to_profile, :except => [:join, :join_not_logged, :index, :add] # before_filter :store_location, :only => [:join, :join_not_logged, :report_abuse, :send_mail] # before_filter :login_required, :only => [:add, :join, :join_not_logged, :leave, :unblock, :leave_scrap, :remove_scrap, :remove_activity, :view_more_activities, :view_more_network_activities, :report_abuse, :register_report, :leave_comment_on_activity, :send_mail] - - def send_email -# puts "ID ***************************" -# y params[:id] -# puts "END ID ***************************" -# profile = Profile[params[:profile]] article = Article.find(params[:id]) EmailArticlePluginMyprofileController::Sender.deliver_mail(article) render :text=>'ok' end - class Sender < ActionMailer::Base def mail(article) - members = article.profile.members emails = [] members.each{ |m| emails.push(m.user.email) } -# puts "***************************" -# y emails -# puts "***************************" content_type 'text/html' recipients emails from "#{article.author.user.name} <#{article.author.user.email}>" reply_to article.author.user.email -# if contact.sender -# headers 'X-Noosfero-Sender' => contact.sender.identifier -# end -# if contact.receive_a_copy -# cc "#{@article.author.user.name} <#{@article.author.user.email}>" -# end subject "[Artigo] " + article.title body article.body end -- libgit2 0.21.2