tkh_authentication 0.9 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/README.md +11 -7
- data/lib/tkh_authentication/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: 2c7403da970fc4181bea045442e434fe45faca3f
|
4
|
+
data.tar.gz: 2c8f630762a841f81d1d04adc5048242694101d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eafb3d70ea059730b2e0a70e62df077d87207d6c5e5a4688d1c38509f0e6756e88ae45cae34960a26badaaa68cefa32262011fd3d2c4ff80e2a178d8936959e0
|
7
|
+
data.tar.gz: 747e59722ceb99267b789d38d9e3bcc4f26d0d9750994e8c66ab77e1ac29ac5dccff6adb96308dd3de2742bb3f893cc079532b5c3dcbf5d0e6183b2defffa05f
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## 0.9
|
6
|
+
|
7
|
+
* Upgraded gem to Rails 4
|
8
|
+
|
9
|
+
|
5
10
|
## 0.1.7
|
6
11
|
|
7
12
|
* Added administrators scope to user model
|
@@ -47,7 +52,7 @@
|
|
47
52
|
|
48
53
|
* Styled login form the simple_form way
|
49
54
|
* Changed some text and translations in login form
|
50
|
-
* Worked on text and translation in signup form
|
55
|
+
* Worked on text and translation in signup form
|
51
56
|
* The shared/menus partial is called from all authentication pages
|
52
57
|
|
53
58
|
|
data/README.md
CHANGED
@@ -8,9 +8,13 @@ It's still in its infancy. Many improvements to come.
|
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
11
|
-
|
11
|
+
For Rails 4.0.0 and above add this line to your application's Gemfile:
|
12
12
|
|
13
|
-
gem '
|
13
|
+
gem 'tkh_toolbox', '~> 0.9'
|
14
|
+
|
15
|
+
For prior versions of Rails, use this:
|
16
|
+
|
17
|
+
gem 'tkh_toolbox', '< 0.9'
|
14
18
|
|
15
19
|
And then execute:
|
16
20
|
|
@@ -19,17 +23,17 @@ And then execute:
|
|
19
23
|
Import migration and locale files
|
20
24
|
|
21
25
|
$ rake tkh_authentication:install
|
22
|
-
|
26
|
+
|
23
27
|
Run the migration
|
24
28
|
|
25
29
|
$ rake db:migrate
|
26
|
-
|
30
|
+
|
27
31
|
You need a root route in your app but most apps have that already.
|
28
32
|
|
29
33
|
And then of course restart your server!
|
30
34
|
|
31
35
|
$ rails s
|
32
|
-
|
36
|
+
|
33
37
|
Upon upgrading to a new version of the gem you might have to update the translation files
|
34
38
|
|
35
39
|
$ rails g tkh_authentication:create_or_update_locales -f
|
@@ -47,11 +51,11 @@ A starting point could be:
|
|
47
51
|
To display the login information module anywhere in your views
|
48
52
|
|
49
53
|
render 'shared/login_info'
|
50
|
-
|
54
|
+
|
51
55
|
To restrict access to your controllers to logged in users:
|
52
56
|
|
53
57
|
before_filter :authenticate, except: 'show'
|
54
|
-
|
58
|
+
|
55
59
|
Additionally, if you want to restrict access to users whose admin boolean attribute is true, add this line just below the authenticate one.
|
56
60
|
|
57
61
|
before_filter :authenticate_with_admin, except: [ 'show', 'index' ]
|