Class: ResourceLink
- Inherits:
 - 
      ApplicationRecord
      
        
- Object
 - ActiveRecord::Base
 - ApplicationRecord
 - ResourceLink
 
 
- Defined in:
 - app/models/resource_link.rb
 
Overview
Schema Information
Table name: resource_links
id                  :bigint(8)        not null, primary key
subject_resource_id :bigint(8)        not null
verb                :string           not null
object_resource_id  :bigint(8)        not null
created_at          :datetime         not null
updated_at          :datetime         not null
Indexes
index_resource_links                         (subject_resource_id,verb,object_resource_id) UNIQUE
index_resource_links_on_object_resource_id   (object_resource_id)
index_resource_links_on_subject_resource_id  (subject_resource_id)
  Instance Method Summary collapse
- 
  
    
      #reverse_verb  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Name of the reversed version of this resource link's verb (hasPart vs isPartOf, etc.).
 
Instance Method Details
#reverse_verb ⇒ String
Returns name of the reversed version of this resource link's verb (hasPart vs isPartOf, etc.)
      33 34 35  | 
    
      # File 'app/models/resource_link.rb', line 33 def reverse_verb Coyote::ResourceLink::VERBS.fetch(verb.to_sym).reverse_verb_name.to_s end  |