d33aa8b757
* Add missing assert_response to signup API test * Add JSON response format to joins#create
23 lines
410 B
Ruby
23 lines
410 B
Ruby
class Users::JoinsController < ApplicationController
|
|
wrap_parameters :user, include: %i[ name avatar ]
|
|
|
|
layout "public"
|
|
|
|
def new
|
|
end
|
|
|
|
def create
|
|
Current.user.update!(user_params)
|
|
|
|
respond_to do |format|
|
|
format.html { redirect_to landing_path }
|
|
format.json { head :no_content }
|
|
end
|
|
end
|
|
|
|
private
|
|
def user_params
|
|
params.expect(user: [ :name, :avatar ])
|
|
end
|
|
end
|