17 lines
398 B
Ruby
17 lines
398 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# Las piratas son las que activan el Miniloom
|
||
|
class PiratasController < ApplicationController
|
||
|
# Registra una cuenta
|
||
|
def create
|
||
|
@pirata = Pirata.new(params
|
||
|
.require(:pirata)
|
||
|
.permit(:email, :nick, :password))
|
||
|
|
||
|
return if @pirata.save
|
||
|
|
||
|
render json: { errors: @pirata.errors.full_messages },
|
||
|
status: :unprocessable_entity
|
||
|
end
|
||
|
end
|