constructorio 2.0.0 → 2.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 +4 -4
- data/README.md +1 -30
- data/lib/constructorio/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34e9a8ea3bf35db06ddd9babd3b610c1c2222d88
|
4
|
+
data.tar.gz: b5ca5cf81af66a4e345477e444392bdd2a1045f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70f50cf84af5eff9ed010663445fc0a17a801d8fc9fcaa8e55a2b8454ac4c2559d35182f5e2600059cdffa70ff0b93ee04fb2287207d2d947ed85a69cab22d30
|
7
|
+
data.tar.gz: 8e1f0c827e18f970b9e6abe085f354d3fda650037966b8cc606b98f31aa46040cd537f632cf4edb40b892ce9fa293c917d29acc32c5350dcf4c33e8701b4a494
|
data/README.md
CHANGED
@@ -18,33 +18,4 @@ Or install it yourself:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
Add an initializer file at config/initializers/constructor-io.rb with values from the [customer dashboard](http://constructor.io/dashboard):
|
24
|
-
```
|
25
|
-
ConstructorIO.configure do |config|
|
26
|
-
config.api_token = 'API_TOKEN'
|
27
|
-
config.autocomplete_key = 'AUTOCOMPLETE_KEY'
|
28
|
-
end
|
29
|
-
```
|
30
|
-
To add autocomplete to a model:
|
31
|
-
|
32
|
-
```
|
33
|
-
class MyModel < ActiveRecord::Base
|
34
|
-
include ConstructorIO
|
35
|
-
constructorio_autocomplete(['attribute1', 'attribute2'])
|
36
|
-
end
|
37
|
-
|
38
|
-
```
|
39
|
-
|
40
|
-
To attach an autocomplete dropdown to an input field, just insert this in your view:
|
41
|
-
|
42
|
-
```
|
43
|
-
<%= constructorio_autocomplete(dom_id: 'id_of_input_field') %>
|
44
|
-
```
|
45
|
-
|
46
|
-
To import an existing data set into Constructor.io, you can use the rake task:
|
47
|
-
|
48
|
-
```
|
49
|
-
rake constructorio:import:model CLASS='MyModel'
|
50
|
-
```
|
21
|
+
For our most up-to-date API documentation, please visit [our website](http://constructor.io/docs/).
|