Class: Api::SerializerHelper

Inherits:
Object
  • Object
show all
Includes:
RelationsSerializerHelper, RolesSerializerHelper, UsersSerializerHelper, UtilsSerializerHelper
Defined in:
app/serializers/concerns/api/serializer_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from UtilsSerializerHelper

#badges, #documents, #documents_feed, #feed_id, #geoloc, #get_feed_attachments, #interests, #ressources, #scope?, #skills

Methods included from UsersSerializerHelper

#creator, #get_user_json, #members, #reviewers, #users

Methods included from RolesSerializerHelper

#is_admin, #is_member, #is_owner, #is_pending, #is_reviewer

Methods included from RelationsSerializerHelper

#has_clapped, #has_followed, #has_saved

Instance Attribute Details

#context=(value) ⇒ Object (writeonly)

Sets the attribute context

Parameters:

  • value

    the value to set the attribute context to.



7
8
9
# File 'app/serializers/concerns/api/serializer_helper.rb', line 7

def context=(value)
  @context = value
end

Instance Method Details

#current_userObject



9
10
11
# File 'app/serializers/concerns/api/serializer_helper.rb', line 9

def current_user
  @context[:current_user]
end