zombodb_rails 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/zombodb_rails.rb +15 -0
- metadata +43 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: a4692f89c2c7c03507124d970c21c7b4409077157b6697fa78fae6a72f3f13ae
|
|
4
|
+
data.tar.gz: 89efeb7de294f34017a3e33601c5297338341246bea2514496f260571f2960aa
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 4bb5b3e0cc903094ac81f70ac4e6f97d571534486f4cb26ec57b31f3a0baa2af4df35235f94b4d84dfbcdee98fa4e01e5d3f6e0097b40a1a326f2cbd2bcd43df
|
|
7
|
+
data.tar.gz: 62ca13bfbbf02021b2f2f54306d878b420fd229b1e52cf8972f7f1d001e90ba6fb4eb396b1df8cd6ab9e5184b6f2cdb913154558fde6e117e55f0258e97fb31c
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class ApplicationRecord < ActiveRecord::Base
|
|
2
|
+
|
|
3
|
+
class << self
|
|
4
|
+
def zdb_columns(*columns)
|
|
5
|
+
@zdb_columns ||= []
|
|
6
|
+
@zdb_columns += columns
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def zdb_search(query, column: nil)
|
|
10
|
+
col = column || self.zdb_columns.first
|
|
11
|
+
where("#{table_name} ==> '#{col}:#{query}'")
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: zombodb_rails
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Alexander Spitsyn
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2020-12-28 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Use ZomboDB with rails!
|
|
14
|
+
email: sanspits@yandex.ru
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- lib/zombodb_rails.rb
|
|
20
|
+
homepage: https://rubygems.org/gems/zombodb_rails
|
|
21
|
+
licenses:
|
|
22
|
+
- MIT
|
|
23
|
+
metadata: {}
|
|
24
|
+
post_install_message:
|
|
25
|
+
rdoc_options: []
|
|
26
|
+
require_paths:
|
|
27
|
+
- lib
|
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - ">="
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
requirements: []
|
|
39
|
+
rubygems_version: 3.0.6
|
|
40
|
+
signing_key:
|
|
41
|
+
specification_version: 4
|
|
42
|
+
summary: ZomboDB rails
|
|
43
|
+
test_files: []
|