rails_apps_pages 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.textile +4 -0
- data/lib/generators/pages/authorized/authorized_generator.rb +2 -0
- data/lib/generators/pages/authorized/templates/registrations_controller.rb +9 -0
- data/lib/generators/pages/users/templates/registrations_controller.rb +9 -0
- data/lib/generators/pages/users/users_generator.rb +2 -0
- data/lib/rails_apps_pages/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a501014f68698e0c208353d76d36a60ccd07c9d
|
4
|
+
data.tar.gz: 920fa94f90863e0f65649932aa75b818260741e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97f13a1161917f139dcac16bb369e33da3a23645b4ae2dfdb6d7648327d1cee8b97fd3f43cf949addccd469125f56447aa69443a2681793c6792936127a4ea47
|
7
|
+
data.tar.gz: 27a597fe4d658940d0d7458dc14ec2510d8989a9211ab3082ef95f254a48ae95b64457f7afd6930490f84563bce9d0f54083a12a862035268f870135f7173b08
|
data/CHANGELOG.textile
CHANGED
@@ -17,6 +17,8 @@ module Pages
|
|
17
17
|
copy_file 'user_policy.rb', 'app/policies/user_policy.rb'
|
18
18
|
route = ' resources :users'
|
19
19
|
inject_into_file 'config/routes.rb', route + "\n", :after => "devise_for :users\n"
|
20
|
+
copy_file 'registrations_controller.rb', 'app/controllers/registrations_controller.rb'
|
21
|
+
gsub_file 'config/routes.rb', /devise_for :users/, 'devise_for :users, :controllers => {:registrations => "registrations"}'
|
20
22
|
copy_file 'visitors/index.html.erb', 'app/views/visitors/index.html.erb'
|
21
23
|
copy_file 'visitors_controller.rb', 'app/controllers/visitors_controller.rb'
|
22
24
|
route = ' root :to => "visitors#index"'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class RegistrationsController < Devise::RegistrationsController
|
2
|
+
before_filter :update_sanitized_params, if: :devise_controller?
|
3
|
+
|
4
|
+
def update_sanitized_params
|
5
|
+
devise_parameter_sanitizer.for(:sign_up) {|u| u.permit(:name, :email, :password, :password_confirmation)}
|
6
|
+
devise_parameter_sanitizer.for(:account_update) {|u| u.permit(:name, :email, :password, :password_confirmation, :current_password)}
|
7
|
+
end
|
8
|
+
|
9
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class RegistrationsController < Devise::RegistrationsController
|
2
|
+
before_filter :update_sanitized_params, if: :devise_controller?
|
3
|
+
|
4
|
+
def update_sanitized_params
|
5
|
+
devise_parameter_sanitizer.for(:sign_up) {|u| u.permit(:name, :email, :password, :password_confirmation)}
|
6
|
+
devise_parameter_sanitizer.for(:account_update) {|u| u.permit(:name, :email, :password, :password_confirmation, :current_password)}
|
7
|
+
end
|
8
|
+
|
9
|
+
end
|
@@ -15,6 +15,8 @@ module Pages
|
|
15
15
|
copy_file 'users_controller.rb', 'app/controllers/users_controller.rb'
|
16
16
|
route = ' resources :users'
|
17
17
|
inject_into_file 'config/routes.rb', route + "\n", :after => "devise_for :users\n"
|
18
|
+
copy_file 'registrations_controller.rb', 'app/controllers/registrations_controller.rb'
|
19
|
+
gsub_file 'config/routes.rb', /devise_for :users/, 'devise_for :users, :controllers => {:registrations => "registrations"}'
|
18
20
|
copy_file 'visitors/index.html.erb', 'app/views/visitors/index.html.erb'
|
19
21
|
copy_file 'visitors_controller.rb', 'app/controllers/visitors_controller.rb'
|
20
22
|
route = ' root :to => "visitors#index"'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_apps_pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Kehoe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- lib/generators/clean/gemfile_generator.rb
|
58
58
|
- lib/generators/clean/routes_generator.rb
|
59
59
|
- lib/generators/pages/authorized/authorized_generator.rb
|
60
|
+
- lib/generators/pages/authorized/templates/registrations_controller.rb
|
60
61
|
- lib/generators/pages/authorized/templates/user_policy.rb
|
61
62
|
- lib/generators/pages/authorized/templates/users/_user.html.erb
|
62
63
|
- lib/generators/pages/authorized/templates/users/index.html.erb
|
@@ -67,6 +68,7 @@ files:
|
|
67
68
|
- lib/generators/pages/home/home_generator.rb
|
68
69
|
- lib/generators/pages/home/templates/index.html.erb
|
69
70
|
- lib/generators/pages/home/templates/visitors_controller.rb
|
71
|
+
- lib/generators/pages/users/templates/registrations_controller.rb
|
70
72
|
- lib/generators/pages/users/templates/users/_user.html.erb
|
71
73
|
- lib/generators/pages/users/templates/users/index.html.erb
|
72
74
|
- lib/generators/pages/users/templates/users/show.html.erb
|