Class: Tomify::Api::Public::UsersController
- Inherits:
-
Object
- Object
- Tomify::Api::Public::UsersController
- Defined in:
- app/controllers/tomify/api/public/users_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/controllers/tomify/api/public/users_controller.rb', line 5 def create session[:current_user_id] = Tomify.models.user.create!(record_params).id create_activity render json: { type: :success }, success: "Welcome #{current_user.name}!" rescue ActiveRecord::RecordInvalid => e render json: { type: :warning, message: e.record.errors..join(", ") } end |