Sha256: a63128a34cdf302cf88a541625c8f00d3dabe48e5b6d22da5f8bcf2d7b76a5a4
Contents?: true
Size: 676 Bytes
Versions: 24
Compression:
Stored size: 676 Bytes
Contents
# frozen_string_literal: true module FmRest module Spyke module Model module Uri extend ::ActiveSupport::Concern class_methods do # Accessor for FM layout (helps with building the URI) # def layout(layout = nil) @layout = layout if layout @layout ||= model_name.name end # Extend uri acccessor to default to FM Data schema # def uri(uri_template = nil) if @uri.nil? && uri_template.nil? return FmRest::V1.record_path(layout) + "(/:id)" end super end end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems