spotlight_search 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/README.md +6 -6
- data/lib/spotlight_search/helpers.rb +2 -2
- data/lib/spotlight_search/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: f966ce0ff53b156ff5331bc5bd4060b1f7bfffea
|
4
|
+
data.tar.gz: 721da67b41a985326fe7411dceda48f9006adfb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc27ae38ec68d276dc5a6021cfb24f1c10925fc42261aedc3c4f1f62ca7cd5d21447168c7b9f36845a068091bbd1e09874531af912a64cdefc9907da8ddef7d4
|
7
|
+
data.tar.gz: 2a08b02a85ed1be18410226d5cfc2117832dd1b0c21309e67de0966c0cbb530d05e84bbace19ac005f066fe71194938365d9a0f6a2bb3117fb7548d6e2b2c962
|
data/.DS_Store
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# SpotlightSearch
|
2
2
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/spotlight_search`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
5
5
|
TODO: Delete this and the text above, and describe your gem
|
6
6
|
|
@@ -9,7 +9,7 @@ TODO: Delete this and the text above, and describe your gem
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem '
|
12
|
+
gem 'spotlight_search'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
@@ -18,7 +18,7 @@ And then execute:
|
|
18
18
|
|
19
19
|
Or install it yourself as:
|
20
20
|
|
21
|
-
$ gem install
|
21
|
+
$ gem install spotlight_search
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
32
|
|
33
33
|
## Contributing
|
34
34
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/spotlight_search. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
36
|
|
37
37
|
## License
|
38
38
|
|
@@ -40,4 +40,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
40
|
|
41
41
|
## Code of Conduct
|
42
42
|
|
43
|
-
Everyone interacting in the
|
43
|
+
Everyone interacting in the SpotlightSearch project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/spotlight_search/blob/master/CODE_OF_CONDUCT.md).
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module SpotlightSearch
|
2
2
|
module Helpers
|
3
|
-
|
3
|
+
|
4
4
|
def sortable(column, title = nil, sort_column="created_at", sort_direction="asc")
|
5
5
|
title ||= column.titleize
|
6
6
|
css_class = column == sort_column ? "current #{sort_direction}" : nil
|
@@ -21,7 +21,7 @@ module SpotlightSearch
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
current_page = content_tag :li do
|
24
|
-
tag.a class: 'btn btn-bordered mx-2', data: {sort_column:
|
24
|
+
tag.a class: 'btn btn-bordered mx-2', data: {sort_column: facets.sort[:sort_column], sort_direction: facets.sort[:sort_direction], page: facets.current_page, behaviour: 'current-page' } do
|
25
25
|
"Showing #{facets.current_page} of #{facets.total_pages} pages"
|
26
26
|
end
|
27
27
|
end
|