Module: JSONAPIonify::Api::Resource::Builders::IdentityHelper
- Included in:
- RelationshipBuilder, ResourceIdentiferBuilder
- Defined in:
- lib/jsonapionify/api/resource/builders/identity_helper.rb
Instance Method Summary collapse
Instance Method Details
#build_id ⇒ Object
12 13 14 |
# File 'lib/jsonapionify/api/resource/builders/identity_helper.rb', line 12 def build_id IdBuilder.build(resource, instance: instance) end |
#build_url ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/jsonapionify/api/resource/builders/identity_helper.rb', line 4 def build_url URI.parse(request.root_url).tap do |uri| uri.path = File.join uri.path, resource_type, build_id sticky_params = resource.sticky_params(context.params) uri.query = sticky_params.to_param if sticky_params.present? end.to_s end |