tkh_search 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b921e4f64a784fc89b26597164c8c2f1636b088d
4
- data.tar.gz: 1eab786b215f5b7f45a3ade67d8480a82ca5340b
3
+ metadata.gz: a9c13ad8f8bddb6d3311a81e0683b7099da3266b
4
+ data.tar.gz: e62e6ff23763187aab3bcf9c541a83cb3be30e04
5
5
  SHA512:
6
- metadata.gz: 6aec8785495eba46ff3dfff3c6a698c50831223e3ea71537916a2a7a8d6bd2029fa929613762283fe9d1e1f57d46975d3de38cfc05519f75b828649721066d7a
7
- data.tar.gz: 5eec46316e12505679dd82d5bde7975eeb3edc642a5e23138e43bc873f768e7deba11d9617e9fc89db9c078b9f18f2b59a62e72b3c4162763872e068aeb6ee39
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/search_form_for_navbar', models_to_search: 'Page', results_css_class: 'blog-js-search-results' %>
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/search_form_for_navbar', models_to_search: 'Event', submit_label: 'find an awesome event' %>
107
+ <%= render 'search/search_form', models_to_search: 'Event', submit_label: 'find an awesome event' %>
108
108
  ```
109
109
 
110
110
 
@@ -0,0 +1,5 @@
1
+ class TkhSearchEvent < ActiveRecord::Base
2
+
3
+ belongs_to :tkh_search_query
4
+
5
+ end
@@ -1,5 +1,5 @@
1
1
  class TkhSearchQuery < ActiveRecord::Base
2
2
 
3
- has_many :tkh_searches, dependent: :destroy
3
+ has_many :tkh_search_events, dependent: :destroy
4
4
 
5
5
  end
@@ -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 "create_tkh_searches.rb", "db/migrate/create_tkh_searches.rb"
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module TkhSearch
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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/tkh_search.rb
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
@@ -1,5 +0,0 @@
1
- class TkhSearch < ActiveRecord::Base
2
-
3
- belongs_to :tkh_search_query
4
-
5
- end
@@ -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