Skip to content
Advertisement

Tag: instance

Rails: How to use instance method in Active Record Query

I am having a filter query which should return all the records where either attribute (column) “status” is not “done”, or instance method “completeness_status” does not return “done” The query is something like that: Studies.where(“studies.status != ? OR studies.completeness_status != ?”, “done”, “done”) but I am getting error that column completeness_status does not exist. Unfortunately, the column status is not

Advertisement