5e0e44b436
* fix map schema - woot it works * update other schemas to include embeddable attrs * update current user schema/examples
24 lines
515 B
Ruby
24 lines
515 B
Ruby
# frozen_string_literal: true
|
|
module Api
|
|
module V2
|
|
class UsersController < RestfulController
|
|
def current
|
|
@user = current_user
|
|
authorize @user
|
|
show # delegate to the normal show function
|
|
end
|
|
|
|
private
|
|
|
|
def searchable_columns
|
|
[:name]
|
|
end
|
|
|
|
# only ask serializer to return is_admin field if we're on the
|
|
# current_user action
|
|
def default_scope
|
|
super.merge(show_full_user: action_name == 'current')
|
|
end
|
|
end
|
|
end
|
|
end
|