madness 0.6.3 → 0.6.4

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
  SHA256:
3
- metadata.gz: 738c48e2b9f8de05775971679254aaedb5ead4a5624d152043dfb2bdc5f3c1d4
4
- data.tar.gz: 23adf7fc6311db77a5ae9aca291c59eb10d32e7ee18b744eacd6c427cbc22cb1
3
+ metadata.gz: 0b8bd26b9b5e653feb97ff0a0b5cc2859729cfd5014d7a2fbeaaf3c7a5de7381
4
+ data.tar.gz: 13c24f4c4af034814918d9cd7543adb770ab62e13d819eb0d4d006b99629a64a
5
5
  SHA512:
6
- metadata.gz: 66709624c71611c17197f3c779be787963d80ec9450dc0d22e2906a2fd90ff936e89b4dc4c1537b1c5047176074936b18cc62cff279ba2f07bcdb439be235312
7
- data.tar.gz: 67c583517fcb33919100504b77042468c3aef3a5d255fb1bf9a24db002d2827e160fe14914317d6a935850604cd3e284c7aa5febddd51e781539248686a143f6
6
+ metadata.gz: e346d93cc0b23989fcfcb66f1d3f65325420fe3999c3a0d37b9afee2d2954e14c51b5e7f77aaa6b990bda3d9cd7b0cb7057ab6b85ae046481aab56e475c2833a
7
+ data.tar.gz: ed1e9e6b986c450596d3853d7f45b3ecbd2da2bbca3032155f069434c5ea0542c18df02d90c8333402f76204e9e4f350d2ebf0a95524fe49d56a6f2453da9c44
@@ -9,7 +9,7 @@ $(function() {
9
9
  preserveInput: false,
10
10
  showNoSuggestionNotice: true,
11
11
  onSelect: function(suggestion) {
12
- window.location = "/" + suggestion.value;
12
+ window.location = "/" + suggestion.data;
13
13
  }
14
14
  });
15
15
  })
@@ -19,7 +19,7 @@ module Madness
19
19
  return { suggestions: [] } if query.empty?
20
20
 
21
21
  results = Search.new.search query
22
- suggestions = results.map { |r| r[:label] } # or r[:file]
22
+ suggestions = results.map { |r| { value: r[:label], data: r[:file] } }
23
23
 
24
24
  response = { suggestions: suggestions }
25
25
  response.to_json
@@ -1,3 +1,3 @@
1
1
  module Madness
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madness
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit