search_rails 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94253c97413a5ae2697e9e55e5b1dec2096b3353
4
- data.tar.gz: 82338b6cccb0cbe5f226c4fec67cfb30fb798e9c
3
+ metadata.gz: a2c4db8f644e116908b0c668fb833aad1b62668d
4
+ data.tar.gz: f29f24f1c4ee40837b17e24e0f0c7b828918adf2
5
5
  SHA512:
6
- metadata.gz: eb9a6f61eceba6ac9ef1d3b702e96733e405087e22f4a7209b2367f22747bc54db4ecd2bbf79ce974fc1fefae005e8c999bec0056cb3c076de5f135a463571db
7
- data.tar.gz: b7993e992b6bcbbc8da63bbc7d42f37c75e3aad39eaa3a080299e04536c3d75ef414039b2bc117da1d510ad6534eecdfa070c0865d0c4c4ac28548c332be6fc3
6
+ metadata.gz: 213a62817b9ff99dde8ea08c1f7855794b686fbb7cecc8a29dc5e80fd9afdf99b161f238935592de3d283486d8aa2441800fbb705b9859921658926ed5966228
7
+ data.tar.gz: ffef939fccbcfb1bd4bfeced063311501697f86bce227370b6ffb23508d131870665f7a90e694bec3e7f65a02d6a18efbf3db6cf67b6c478761834968def7bc6
data/README.md CHANGED
@@ -20,12 +20,45 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- To install the search functionality, type the command
23
+ To install the search functionality, type the command:
24
+
25
+ $ search:install
26
+
27
+ Then follow below.
28
+
29
+ The syntax for installing the search function is shown in the example below,
30
+ as if you are installing it for the table 'humans' and the attributes 'name' (string) and 'age' (integer):
31
+
32
+ $ install humans name:string age:integer
33
+
34
+ After that run:
35
+
36
+ $ rake db:migrate
37
+
38
+ Then insert the following form on whatever page you have set up for the search function:
24
39
 
25
40
  ```ruby
26
- search:install
41
+ <%= form_for @search do |f| %>
42
+ <%= f.text_field :search %>
43
+ <%= link_to 'x', clear_search_path(@search) %>
44
+ <% end -%>
27
45
  ```
28
46
 
47
+
48
+ Then add the following lines to whatever controller action you want to have the search functionality in.
49
+
50
+ ```ruby
51
+ $LOAD_PATH.unshift(File.dirname('../app/search'))
52
+ extend SearchModule
53
+ @search = Search.find_by_search_id(1)
54
+ if @search.search != nil
55
+ search()
56
+ end
57
+ ```
58
+
59
+ This is still a work in progress, so if there is any issues, please report them on the GitHub page.
60
+
61
+
29
62
  ## Contributing
30
63
 
31
64
  Bug reports and pull requests are welcome on GitHub at https://github.com/micahnico/search_rails.
@@ -33,5 +66,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/micahn
33
66
 
34
67
  ## License
35
68
 
36
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
37
-
69
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -1,3 +1,3 @@
1
1
  module SearchRails
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - micahnico22