app/controllers/social_mailer_controller.rb in trusty-cms-4.1.2 vs app/controllers/social_mailer_controller.rb in trusty-cms-4.1.3

- old
+ new

@@ -1,36 +1,33 @@ class SocialMailerController < ApplicationController include ShareLayouts::Controllers::ActionController - trusty_layout "default", {:only => :create_social_mail} + trusty_layout 'default', { only: :create_social_mail } # no_login_required skip_before_action :authenticate_user! def create_social_mail - mailer_options = { - :to => params[:to], - :from => params[:from], - :from_name => params[:from_name], - :message => params[:message], - :subject => params[:subject] + to: params[:to], + from: params[:from], + from_name: params[:from_name], + message: params[:message], + subject: params[:subject], } if verify_recaptcha(action: 'emailSeats') RadSocialMailer.social_mail(mailer_options).deliver_now head :ok else - head :bad_request, :ErrorMsg => 'We have detected suspicious activity and have disabled this feature for your user.' + head :bad_request, ErrorMsg: 'We have detected suspicious activity and have disabled this feature for your user.' end - end def social_mail_form - render :template => "rad_social_mailer/social_mail_form", - :layout => false, - :locals => { - :email_message => params[:email_message], - :email_subject => params[:email_subject], - :email_action_url => params[:email_action_url] + render template: 'rad_social_mailer/social_mail_form', + layout: false, + locals: { + email_message: params[:email_message], + email_subject: params[:email_subject], + email_action_url: params[:email_action_url], } end - end