url_security 0.1.2 → 0.1.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.
- data/README.md +6 -6
- data/lib/url_security/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
|
@@ -24,19 +24,19 @@ Or install it yourself as:
|
|
|
24
24
|
|
|
25
25
|
Write the following line in your model.rb file:
|
|
26
26
|
|
|
27
|
-
include UrlSecurity
|
|
27
|
+
include UrlSecurity
|
|
28
28
|
|
|
29
29
|
Write the following method in same model:
|
|
30
30
|
|
|
31
|
-
def to_param
|
|
32
|
-
|
|
33
|
-
end
|
|
31
|
+
def to_param
|
|
32
|
+
encrypt id
|
|
33
|
+
end
|
|
34
34
|
|
|
35
35
|
Write the following line in your controller:
|
|
36
|
-
@student = Student.find Student.decrypt(params[:id])
|
|
36
|
+
@student = Student.find Student.decrypt(params[:id])
|
|
37
37
|
|
|
38
38
|
instead of:
|
|
39
|
-
@student = Student.find(params[:id])
|
|
39
|
+
@student = Student.find(params[:id])
|
|
40
40
|
|
|
41
41
|
## Contributing
|
|
42
42
|
|
data/lib/url_security/version.rb
CHANGED