# frozen_string_literal: true class FeedbacksController < ApplicationController respond_to :json skip_before_action :verify_authenticity_token, only: [:create] 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 # def extended_feedback_params # params.require(:feedback).permit(:name, :email, :content, :country_code, :phone_state, :phone_number) # end end