foodsoft/app/controllers/feedback_controller.rb

21 lines
407 B
Ruby
Raw Normal View History

class FeedbackController < ApplicationController
def new
render :update do |page|
page.replace_html :ajax_box, :partial => "new"
page.show :ajax_box
end
end
def create
unless params[:message].blank?
2011-05-11 10:53:18 +02:00
Mailer.feedback(current_user, params[:message]).deliver
end
render :update do |page|
page.replace_html :ajax_box, :partial => "success"
end
end
end