Module: HalApi::RepresentedModel
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/hal_api/represented_model.rb
Instance Attribute Summary collapse
-
#is_root_resource ⇒ Object
this concept is used in result set, perhaps doesn’t belong in model itself consider if there is a better way to do this - decorate model instead?.
Instance Method Summary collapse
Instance Attribute Details
#is_root_resource ⇒ Object
this concept is used in result set, perhaps doesn’t belong in model itself consider if there is a better way to do this - decorate model instead?
8 9 10 |
# File 'lib/hal_api/represented_model.rb', line 8 def is_root_resource @is_root_resource end |
Instance Method Details
#id_from_url(url) ⇒ Object
18 19 20 |
# File 'lib/hal_api/represented_model.rb', line 18 def id_from_url(url) Rails.application.routes.recognize_path(url)[:id] end |
#show_curies ⇒ Object
14 15 16 |
# File 'lib/hal_api/represented_model.rb', line 14 def show_curies is_root_resource end |