Module: HasArrayScopes::Taggable

Defined in:
lib/has_array_scopes/taggable.rb

Overview

Mix-in that adds array_scope :col and the matching
tagged_with / not_tagged_with / Ransack predicates to a model
whose tag column is a Postgres text[].

Defined Under Namespace

Modules: ClassMethod

Constant Summary collapse

TYPE_MATCHER =

Type matcher.

{
  string: "varchar", text: "text", integer: "integer",
  bigint: "bigint", uuid: "uuid", boolean: "boolean",
  float: "float", decimal: "numeric"
}.freeze

Class Method Summary collapse

Class Method Details

.included(base) ⇒ void

This method returns an undefined value.

Returns extends the base class with ClassMethod.



9
10
11
# File 'lib/has_array_scopes/taggable.rb', line 9

def self.included(base)
  base.extend(ClassMethod)
end