Class: EventsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



3
4
5
6
7
8
9
10
# File 'app/controllers/events_controller.rb', line 3

def create
  event = Event.new(
      project_id: params[:project_id],
      name: params[:name],
  )
  event.execute
  render json: event
end