module SocialStream::Oauth2Server::Models::User
Public Instance Methods
as_json_with_client(options = {})
click to toggle source
Include application role information in the json
# File lib/social_stream/oauth2_server/models/user.rb, line 36 def as_json_with_client options = {} hash = as_json_without_client options if options[:client] && !options[:client].is_a?(User) hash['roles'] = options[:client].contact_to!(self).relations.map{ |r| { id: r.id, name: r.name } } end hash end