url_security 0.1.1 → 0.1.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.
- data/README.md +9 -13
- data/lib/url_security/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
|
@@ -22,26 +22,22 @@ Or install it yourself as:
|
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
25
|
-
Write the following line in your
|
|
26
|
-
|
|
25
|
+
Write the following line in your model.rb file:
|
|
26
|
+
|
|
27
27
|
include UrlSecurity
|
|
28
|
-
```
|
|
29
|
-
|
|
30
28
|
|
|
31
|
-
Write the following method in same model
|
|
32
|
-
|
|
29
|
+
Write the following method in same model:
|
|
30
|
+
|
|
33
31
|
def to_param
|
|
34
32
|
encrypt id
|
|
35
33
|
end
|
|
36
|
-
|
|
37
|
-
Write the following line in your controller
|
|
38
|
-
```ruby
|
|
34
|
+
|
|
35
|
+
Write the following line in your controller:
|
|
39
36
|
@student = Student.find Student.decrypt(params[:id])
|
|
40
|
-
|
|
41
|
-
instead of
|
|
42
|
-
```ruby
|
|
37
|
+
|
|
38
|
+
instead of:
|
|
43
39
|
@student = Student.find(params[:id])
|
|
44
|
-
|
|
40
|
+
|
|
45
41
|
## Contributing
|
|
46
42
|
|
|
47
43
|
1. Fork it ( https://github.com/[my-github-username]/url_security/fork )
|
data/lib/url_security/version.rb
CHANGED