Class: AbrahamHistoriesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/abraham_histories_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



4
5
6
7
8
9
10
11
12
13
14
# File 'app/controllers/abraham_histories_controller.rb', line 4

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