tkh_search 0.0.1 → 0.0.2
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 +2 -2
- data/app/models/tkh_search_event.rb +5 -0
- data/app/models/tkh_search_query.rb +1 -1
- data/lib/generators/tkh_search/create_or_update_migrations/create_or_update_migrations_generator.rb +1 -1
- data/lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_events.rb +17 -0
- data/lib/tkh_search/version.rb +1 -1
- metadata +3 -3
- data/app/models/tkh_search.rb +0 -5
- data/lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_searches.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9c13ad8f8bddb6d3311a81e0683b7099da3266b
|
4
|
+
data.tar.gz: e62e6ff23763187aab3bcf9c541a83cb3be30e04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e89dfc96b69c2073d471b6dcfe577bf13b105dd33ad5b4bbc1cd5a22585a55eb884f7825b854fa018dd20f8abf62e47eaf2dabdc924b14c254611c8173f23db0
|
7
|
+
data.tar.gz: 3696b630bc4c8dd5e326f5f0a603e4083b1600d7ed5ba9f896b21c0a75f901cfaa94b3edcdb19bd82c7a483f2f045dacfd75f05a8e4fed0a9a5d53f3737b85eb
|
data/README.md
CHANGED
@@ -93,7 +93,7 @@ There is a form partial to that effect.
|
|
93
93
|
In this case you have to tell the gem in which div to render the results.
|
94
94
|
|
95
95
|
```ruby
|
96
|
-
<%= render 'search/
|
96
|
+
<%= render 'search/search_form', models_to_search: 'Page', results_css_class: 'blog-js-search-results' %>
|
97
97
|
```
|
98
98
|
|
99
99
|
And of course, you need to place a div with the same class name under your form.
|
@@ -104,7 +104,7 @@ And of course, you need to place a div with the same class name under your form.
|
|
104
104
|
This can also be used for the sake of localization
|
105
105
|
|
106
106
|
```ruby
|
107
|
-
<%= render 'search/
|
107
|
+
<%= render 'search/search_form', models_to_search: 'Event', submit_label: 'find an awesome event' %>
|
108
108
|
```
|
109
109
|
|
110
110
|
|
data/lib/generators/tkh_search/create_or_update_migrations/create_or_update_migrations_generator.rb
CHANGED
@@ -20,7 +20,7 @@ module TkhSearch
|
|
20
20
|
migration_template "create_tkh_search_terms.rb", "db/migrate/create_tkh_search_terms.rb"
|
21
21
|
migration_template "create_tkh_search_instances.rb", "db/migrate/create_tkh_search_instances.rb"
|
22
22
|
migration_template "create_tkh_search_queries.rb", "db/migrate/create_tkh_search_queries.rb"
|
23
|
-
migration_template "
|
23
|
+
migration_template "create_tkh_search_events.rb", "db/migrate/create_tkh_search_events.rb"
|
24
24
|
migration_template "create_tkh_search_results.rb", "db/migrate/create_tkh_search_results.rb"
|
25
25
|
end
|
26
26
|
|
data/lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_events.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateTkhSearchEvents < ActiveRecord::Migration
|
2
|
+
|
3
|
+
def self.up
|
4
|
+
create_table :tkh_search_events do |t|
|
5
|
+
t.integer :tkh_search_query_id
|
6
|
+
t.string :language
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
add_index :tkh_search_events, :tkh_search_query_id
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
remove_index :tkh_search_events, :tkh_search_query_id
|
14
|
+
drop_table :tkh_search_events
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
data/lib/tkh_search/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tkh_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swami Atma
|
@@ -81,7 +81,7 @@ files:
|
|
81
81
|
- README.md
|
82
82
|
- Rakefile
|
83
83
|
- app/controllers/search_controller.rb
|
84
|
-
- app/models/
|
84
|
+
- app/models/tkh_search_event.rb
|
85
85
|
- app/models/tkh_search_instance.rb
|
86
86
|
- app/models/tkh_search_query.rb
|
87
87
|
- app/models/tkh_search_result.rb
|
@@ -93,11 +93,11 @@ files:
|
|
93
93
|
- app/views/search/index.js.erb
|
94
94
|
- config/routes.rb
|
95
95
|
- lib/generators/tkh_search/create_or_update_migrations/create_or_update_migrations_generator.rb
|
96
|
+
- lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_events.rb
|
96
97
|
- lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_instances.rb
|
97
98
|
- lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_queries.rb
|
98
99
|
- lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_results.rb
|
99
100
|
- lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_terms.rb
|
100
|
-
- lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_searches.rb
|
101
101
|
- lib/generators/tkh_search/install_initializer/install_initializer_generator.rb
|
102
102
|
- lib/generators/tkh_search/install_initializer/templates/tkh_search.rb
|
103
103
|
- lib/tasks/tkh_search_tasks.rake
|
data/app/models/tkh_search.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateTkhSearches < ActiveRecord::Migration
|
2
|
-
|
3
|
-
def self.up
|
4
|
-
create_table :tkh_searches do |t|
|
5
|
-
t.integer :tkh_search_query_id
|
6
|
-
t.string :language
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
add_index :tkh_searches, :tkh_search_query_id
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
remove_index :tkh_searches, :tkh_search_query_id
|
14
|
-
drop_table :tkh_searches
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|