Class: Edools::Core::Address
- Defined in:
- lib/edools/core/address.rb
Class Method Summary collapse
Methods inherited from Base
refresh_config!, version, version=
Class Method Details
.collection_path(prefix_options = {}, query_options = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/edools/core/address.rb', line 7 def self.collection_path( = {}, = nil) super student_id = [:student_id] || .try(:[], :student_id) collaborator_id = [:collaborator_id] || .try(:[], :collaborator_id) if student_id "/students/#{student_id}/#{collection_name}.#{format.extension}#{query_string(query_options)}" elsif collaborator_id "/collaborators/#{collaborator_id}/#{collection_name}.#{format.extension}#{query_string(query_options)}" end end |