Method: PaperTrail::Queries::Versions::WhereObject#execute

Defined in:
lib/mongo_trails/queries/versions/where_object.rb

#executeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/mongo_trails/queries/versions/where_object.rb', line 20

def execute
  column = @version_model_class.columns_hash["object"]
  raise "where_object can't be called without an object column" unless column

  case column.type
  when :jsonb
    jsonb
  when :json
    json
  else
    text
  end
end