Class: FeedbacksController

Inherits:
ApplicationController show all
Defined in:
app/controllers/feedbacks_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

caches_page_with_cache_marker, #raise_not_found!

Instance Method Details

#createObject



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

def create
  @feedback = ContactsForm.new(params)
  @feedback.remote_ip = request.remote_ip
  @feedback.submit if @feedback.valid?

  respond_to do |format|
    format.json { render json: { status: :success } }
    format.all { redirect_to root_path }
  end
  # respond_with @feedback
end