walter/app/controllers/abraham_histories_controller.rb
Sean 28da972b66
Update abraham_histories_controller.rb (#44)
Remove unneeded boilerplate comment.
2021-04-15 15:42:50 -04:00

22 lines
619 B
Ruby

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