Merge branch 'master' of git.clinicalfuture.com:arvados
[arvados.git] / services / api / app / models / arvados_model.rb
index ec99c9efb90a920b24652b044e1815981703232a..136684d009d533791172f6969ea9e326836e0633 100644 (file)
@@ -22,6 +22,10 @@ class ArvadosModel < ActiveRecord::Base
     kind.match(/^arvados\#(.+?)(_list|List)?$/)[1].pluralize.classify.constantize rescue nil
   end
 
+  def href
+    "#{current_api_base}/#{self.class.to_s.pluralize.underscore}/#{self.uuid}"
+  end
+
   def eager_load_associations
     self.class.columns.each do |col|
       re = col.name.match /^(.*)_kind$/