Class: FeedbackController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/feedback_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/feedback_controller.rb', line 8

def create
  @theme = params[:theme].blank? ? I18n.t("feedback_mailer.without_theme") : params[:theme]
  @sender = params[:sender].blank? ? I18n.t("feedback_mailer.without_sender") : params[:sender]
  @body = params[:body].blank? ? "" : params[:body]
  if !@body.blank?
    FeedbackFormMailer.feedback(@theme, @sender, @body).deliver
    flash[:notice] = I18n.t("feedback_mailer.your_letter_sent")
  else
    flash[:error] = I18n.t("feedback_mailer.your_letter_is_not_sent")
  end
  redirect_to after_feedback_path
end

#indexObject



6
# File 'app/controllers/feedback_controller.rb', line 6

def index; end