Module: FmRest::Spyke::Model::Uri
- Extended by:
- ActiveSupport::Concern
- Included in:
- FmRest::Spyke::Model
- Defined in:
- lib/fmrest/spyke/model/uri.rb
Class Method Summary collapse
-
.layout(layout = nil) ⇒ Object
Accessor for FM layout (helps with building the URI).
-
.uri(uri_template = nil) ⇒ Object
Extend uri acccessor to default to FM Data schema.
Class Method Details
.layout(layout = nil) ⇒ Object
Accessor for FM layout (helps with building the URI)
12 13 14 15 |
# File 'lib/fmrest/spyke/model/uri.rb', line 12 def layout(layout = nil) @layout = layout if layout @layout ||= model_name.name end |
.uri(uri_template = nil) ⇒ Object
Extend uri acccessor to default to FM Data schema
19 20 21 22 23 24 25 |
# File 'lib/fmrest/spyke/model/uri.rb', line 19 def uri(uri_template = nil) if @uri.nil? && uri_template.nil? return FmRest::V1.record_path(layout) + "(/:id)" end super end |