rails3_devise_wizard 0.2.3 → 0.2.4
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/recipes/add_user_name.rb +30 -5
- data/version.rb +1 -1
- metadata +3 -3
data/recipes/add_user_name.rb
CHANGED
@@ -30,11 +30,36 @@ RUBY
|
|
30
30
|
end
|
31
31
|
|
32
32
|
if recipes.include? 'devise'
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
unless recipes.include? 'haml'
|
34
|
+
|
35
|
+
# Generate Devise views (unless you are using Haml)
|
36
|
+
run 'rails generate devise:views'
|
37
|
+
|
38
|
+
# Modify Devise views to add 'name'
|
39
|
+
inject_into_file "app/views/devise/registrations/edit.html.erb", :after => "<%= devise_error_messages! %>\n" do
|
40
|
+
<<-ERB
|
41
|
+
<p><%= f.label :name %><br />
|
42
|
+
<%= f.text_field :name %></p>
|
43
|
+
ERB
|
44
|
+
end
|
45
|
+
|
46
|
+
inject_into_file "app/views/devise/registrations/new.html.erb", :after => "<%= devise_error_messages! %>\n" do
|
47
|
+
<<-ERB
|
48
|
+
<p><%= f.label :name %><br />
|
49
|
+
<%= f.text_field :name %></p>
|
50
|
+
ERB
|
51
|
+
end
|
52
|
+
|
53
|
+
else
|
54
|
+
|
55
|
+
# copy Haml versions of modified Devise views
|
56
|
+
inside 'app/views/devise/registrations' do
|
57
|
+
get 'https://github.com/fortuity/rails3-application-templates/raw/master/files/rails3-mongoid-devise/app/views/devise/registrations/edit.html.haml', 'edit.html.haml'
|
58
|
+
get 'https://github.com/fortuity/rails3-application-templates/raw/master/files/rails3-mongoid-devise/app/views/devise/registrations/new.html.haml', 'new.html.haml'
|
59
|
+
end
|
60
|
+
|
37
61
|
end
|
62
|
+
|
38
63
|
end
|
39
64
|
|
40
65
|
end
|
@@ -47,4 +72,4 @@ author: fortuity
|
|
47
72
|
|
48
73
|
requires: [devise]
|
49
74
|
category: other
|
50
|
-
tags: [utilities, configuration]
|
75
|
+
tags: [utilities, configuration]
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rails3_devise_wizard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Daniel Kehoe
|
@@ -172,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
172
|
requirements:
|
173
173
|
- - ">="
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
hash:
|
175
|
+
hash: 291566255609786799
|
176
176
|
segments:
|
177
177
|
- 0
|
178
178
|
version: "0"
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
requirements:
|
182
182
|
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
hash:
|
184
|
+
hash: 291566255609786799
|
185
185
|
segments:
|
186
186
|
- 0
|
187
187
|
version: "0"
|