model/systematic_review.rb
def canonical_documents(type=:all)
    cd_ids=case type
             when :record
               cd_record_id
             when :reference
               cd_reference_id
             when :all
                cd_all_id
             else
               raise(I18n::t(:Not_defined_for_this_stage))
           end
    if type==:all
      CanonicalDocument.join(cd_id_table, canonical_document_id: :id   )
    else
      CanonicalDocument.where(:id => cd_ids)
    end
  end
# Presenta los documentos canonicos
# para la revision. Une los por
# registro y reference
Presenta los documentos canonicos
para la revision. Une los por
registro y reference
Presenta los documentos canonicos para la revision . Une los por registro y reference
def canonical_documents(type=:all)
    cd_ids=case type
             when :record
               cd_record_id
             when :reference
               cd_reference_id
             when :all
                cd_all_id
             else
               raise(I18n::t(:Not_defined_for_this_stage))
           end
    if type==:all
      CanonicalDocument.join(cd_id_table, canonical_document_id: :id   )
    else
      CanonicalDocument.where(:id => cd_ids)
    end
  end
def canonical_documents ( type = :all ) cd_ids = case type when :record cd_record_id when :reference cd_reference_id when :all cd_all_id else raise ( I18n :: t ( :Not_defined_for_this_stage ) ) end if type == :all CanonicalDocument . join ( cd_id_table , canonical_document_id : :id ) else CanonicalDocument . where ( :id => cd_ids ) end end
Presenta los documentos canonicos
para la revision.
Presenta los documentos canonicos para la revision .
type