Class: ActiveEnquo::Type::Boolean

Inherits:
ActiveEnquo::Type show all
Defined in:
lib/active_enquo.rb

Instance Method Summary collapse

Instance Method Details

#decrypt(value, context, field) ⇒ Object



277
278
279
# File 'lib/active_enquo.rb', line 277

def decrypt(value, context, field)
	field.decrypt_boolean(value, context)
end

#encrypt(value, context, field, enable_reduced_security_operations: false, no_query: false) ⇒ Object



269
270
271
272
273
274
275
# File 'lib/active_enquo.rb', line 269

def encrypt(value, context, field, enable_reduced_security_operations: false, no_query: false)
	if value.nil? || value.is_a?(::ActiveRecord::StatementCache::Substitute)
		value
	else
		field.encrypt_boolean(value, context, unsafe: enable_reduced_security_operations, no_query: no_query)
	end
end

#typeObject



265
266
267
# File 'lib/active_enquo.rb', line 265

def type
	:enquo_boolean
end