rails_apps_pages 0.2.0 → 0.3.0

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: dabd0b8953eea28a91d4e338405ec9246b063f63
4
- data.tar.gz: 64fd9902b64d7ef3b45522b63c1fe8d91640f5ee
3
+ metadata.gz: 3a501014f68698e0c208353d76d36a60ccd07c9d
4
+ data.tar.gz: 920fa94f90863e0f65649932aa75b818260741e9
5
5
  SHA512:
6
- metadata.gz: 66d4cf28f09932dd29353eb59ccc520f1db3c6eeb2601ac90848e4392cc94dd1fbd134f0d9fc18155d99f3d6c3b8872b928ab928d6e9f154bed65892cd896d6c
7
- data.tar.gz: 121b0a57c871377b70af93b0b2f8d282470f447decc419ede45051111d83cad1e2792982f6378ae71cf50f55af882c4d9d129b1fcc819dfb363259d62eeccfd3
6
+ metadata.gz: 97f13a1161917f139dcac16bb369e33da3a23645b4ae2dfdb6d7648327d1cee8b97fd3f43cf949addccd469125f56447aa69443a2681793c6792936127a4ea47
7
+ data.tar.gz: 27a597fe4d658940d0d7458dc14ec2510d8989a9211ab3082ef95f254a48ae95b64457f7afd6930490f84563bce9d0f54083a12a862035268f870135f7173b08
data/CHANGELOG.textile CHANGED
@@ -1,5 +1,9 @@
1
1
  h1. CHANGELOG
2
2
 
3
+ h3. 0.3.0 May 1, 2014
4
+
5
+ * add Devise registrations controller for 'users' and 'authorized' generators
6
+
3
7
  h3. 0.2.0 May 1, 2014
4
8
 
5
9
  * fixes for 'authorized' generator
@@ -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"'
@@ -1,3 +1,3 @@
1
1
  module RailsAppsPages
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.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-01 00:00:00.000000000 Z
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