# frozen_string_literal: true class WalterHistoriesController < ApplicationController def create @walter_history = WalterHistory.new(walter_history_params) @walter_history.creator_id = current_user.id respond_to do |format| if @walter_history.save format.json { render json: @walter_history, status: :created } else format.json { render json: @walter_history.errors, status: :unprocessable_entity } end end end private def walter_history_params params.require(:walter_history).permit(:controller_name, :action_name, :tour_name) end end