app/controllers/swimming_pool_reviews_controller.rb
# Sends an e-mail abuse report for a specific SwimmingPoolReview id.
#
# TODO FUTUREDEV: add support for xhr request in this action
#
# === Params:
# - id: the SwimmingPoolReview.id
#
Sends an e-mail abuse report for a specific SwimmingPoolReview id.
TODO FUTUREDEV: add support for xhr request in this action


Sends an e - mail abuse report for a specific SwimmingPoolReview id . TODO FUTUREDEV : add support for xhr request in this action
def report_abuse
    @review = SwimmingPoolReview.find_by_id(params[:id])
    if @review
      AgexMailer.report_abuse_mail( current_user, @review.user, 'SwimmingPoolReview', @review.id, @review.title ).deliver
      flash[:info] = I18n.t('swimming_pool_review.thanks_for_the_report')
    else
      flash[:error] = I18n.t(:invalid_action_request)
    end
    redirect_to(root_path) and return
  end
def report_abuse @review = SwimmingPoolReview . find_by_id ( params [ :id ] ) if @review AgexMailer . report_abuse_mail ( current_user , @review . user , 'SwimmingPoolReview' , @review . id , @review . title ) . deliver flash [ :info ] = I18n . t ( 'swimming_pool_review.thanks_for_the_report' ) else flash [ :error ] = I18n . t ( :invalid_action_request ) end redirect_to ( root_path ) and return end
Sends an e-mail abuse report for a specific SwimmingPoolReview id.
Sends an e - mail abuse report for a specific SwimmingPoolReview id .