Sha256: dac5e8dad3c8af21e38a02c0c95de14ecfbfb4f5c026bf40349f978c14cdfebb
Contents?: true
Size: 684 Bytes
Versions: 4
Compression:
Stored size: 684 Bytes
Contents
# frozen_string_literal: true module Europeana module FeedbackButton class FeedbackController < ApplicationController include FeedbackHelper def create if feedback_enabled? && FeedbackMailer.post(mailer_post_args).deliver_later respond_to do |format| format.json { render json: { success: true } } end else respond_to do |format| format.json { render json: { success: false }, status: 500 } end end end private def mailer_post_args { text: params[:text], type: params[:type], page: params[:page], ip: request.remote_ip } end end end end
Version data entries
4 entries across 4 versions & 1 rubygems