Class: Edools::Core::Enrollment

Inherits:
Base
  • Object
show all
Defined in:
lib/edools/core/enrollment.rb

Class Method Summary collapse

Methods inherited from Base

refresh_config!, version, version=

Class Method Details

.collection_path(prefix_options = {}, query_options = nil) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/edools/core/enrollment.rb', line 9

def self.collection_path(prefix_options = {}, query_options = nil)
  super
  student_id = prefix_options[:student_id] || query_options.try(:[], :student_id)
  if student_id
    "/students/#{student_id}/#{collection_name}.#{format.extension}#{query_string(query_options)}"
  else
    "/#{collection_name}.#{format.extension}#{query_string(query_options)}"
  end
end