class Object

Public Instance Methods

add_new_operation() click to toggle source
# File lib/revelry_data/jsonapi_resources_patch.rb, line 37
def add_new_operation
  @operations.push JSONAPI::NewOperation.new(
                     @resource_klass,
                     {
                       context: @context,
                       include_directives: @include_directives,
                     }
                   )
end
base_response_meta() click to toggle source
# File lib/revelry_data/jsonapi_resources_patch.rb, line 49
def base_response_meta
  {
    current_user: current_user,
    csrf_token: form_authenticity_token,
    current_org: current_user.try(:org),
    flashes: flash,
  }
end
setup_new_action(params) click to toggle source
# File lib/revelry_data/jsonapi_resources_patch.rb, line 31
def setup_new_action(params)
  parse_fields(params[:fields])
  parse_include_directives(params[:include])
  add_new_operation
end