rails_apps_pages 0.5.2 → 0.5.3
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/users/templates/devise/devise_permitted_parameters.rb +17 -0
- data/lib/generators/pages/users/users_generator.rb +1 -2
- data/lib/rails_apps_pages/version.rb +1 -1
- metadata +3 -3
- data/lib/generators/pages/users/templates/devise/permitted_parameters.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 355c6e54cc24fa1ca3ac67d8418b3159be8c9ecf
|
4
|
+
data.tar.gz: d126b7a537e04043f267f0844cab6f4a6143f194
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af1865e41d201f1e12f931bd16be87dcbd085339c02530ce6e8052b6aba9a8a4e990f74e1bc8468eb7b79ed142860993e4f1a5327c81c5585c59afda2d2b7094
|
7
|
+
data.tar.gz: 2b816bf99d2c4612675ee57975403beb431b2247a5eb6321e3df7d0d88be5d0e055c27427b244ef0dd294d532b0116986cc91a0a58f235a82e3fb886f4752d52
|
data/CHANGELOG.textile
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
module DevisePermittedParameters
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
before_filter :configure_permitted_parameters
|
6
|
+
end
|
7
|
+
|
8
|
+
protected
|
9
|
+
|
10
|
+
def configure_permitted_parameters
|
11
|
+
devise_parameter_sanitizer.for(:sign_up) << :name
|
12
|
+
devise_parameter_sanitizer.for(:account_update) << :name
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
DeviseController.send :include, DevisePermittedParameters
|
@@ -36,8 +36,7 @@ module Pages
|
|
36
36
|
return unless File.exists?('config/initializers/devise.rb')
|
37
37
|
if Object.const_defined?('User')
|
38
38
|
if User.column_names.include? 'name'
|
39
|
-
|
40
|
-
inject_into_file 'app/controllers/application_controller.rb', permitted + "\n", :after => "protect_from_forgery with: :exception\n"
|
39
|
+
copy_file 'devise/devise_permitted_parameters.rb', 'config/initializers/devise_permitted_parameters.rb'
|
41
40
|
prepend_file 'app/views/users/_user.html.erb', "<td><%= link_to user.name, user %></td>\n"
|
42
41
|
inject_into_file 'app/views/users/show.html.erb', "\n<p>Name: <%= @user.name if @user.name %></p>", :before => "\n<p>Email"
|
43
42
|
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.5.
|
4
|
+
version: 0.5.3
|
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-06-
|
11
|
+
date: 2014-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,7 +67,7 @@ files:
|
|
67
67
|
- lib/generators/pages/home/templates/home_page_spec.rb
|
68
68
|
- lib/generators/pages/home/templates/index.html.erb
|
69
69
|
- lib/generators/pages/home/templates/visitors_controller.rb
|
70
|
-
- lib/generators/pages/users/templates/devise/
|
70
|
+
- lib/generators/pages/users/templates/devise/devise_permitted_parameters.rb
|
71
71
|
- lib/generators/pages/users/templates/devise/users_controller.rb
|
72
72
|
- lib/generators/pages/users/templates/omniauth/users_controller.rb
|
73
73
|
- lib/generators/pages/users/templates/users/_user.html.erb
|