rails_layout 1.0.7 → 1.0.8
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/README.textile +2 -2
- data/lib/generators/layout/devise/devise_generator.rb +22 -2
- data/lib/rails_layout/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a34977f189247017c4024017cad732c4e1ba486
|
4
|
+
data.tar.gz: 5cdd77e8427c3938e8314d1fa71ee426f9cf081d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fa7173a4fbc11bc09a0b9940a06ad648884dfeaf59f016969651715af7d92b5a04db2c179eec52db074f9ce239f72341e85f11386fcffc1efbe2ac8be93d628
|
7
|
+
data.tar.gz: 6ccc8b3c0741d70514b8a2fa7ffcc5f26f375bac977016db1b967500565bcbe943ee087ffcb0e9226b7fefad788f013787acc21b2c3492677854fe5c59c8f224
|
data/CHANGELOG.textile
CHANGED
data/README.textile
CHANGED
@@ -58,10 +58,10 @@ Add the gems you need to your Rails application Gemfile:
|
|
58
58
|
h4. Zurb Foundation 5.0
|
59
59
|
|
60
60
|
<pre>
|
61
|
-
gem 'foundation-rails'
|
61
|
+
gem 'foundation-rails', '5.0.3.1'
|
62
62
|
</pre>
|
63
63
|
|
64
|
-
Foundation
|
64
|
+
Foundation versions 5.0.1 and 5.0.2 were "incompatible with Rails Turbolinks":https://github.com/zurb/foundation/issues/3642 and the Rails asset pipeline. The foundation-rails gem version 5.1.1.0 is incompatible with the Rails asset pipeline. Use foundation-rails gem version 5.0.3.1 pending resolution of the "issue":https://github.com/zurb/foundation/issues/4494.
|
65
65
|
|
66
66
|
h4. Zurb Foundation 4.0
|
67
67
|
|
@@ -8,7 +8,6 @@ module Layout
|
|
8
8
|
|
9
9
|
desc "Copies Devise views to your application, with styling for a front-end framework."
|
10
10
|
|
11
|
-
# Add stylesheet for Devise views
|
12
11
|
def add_devise_stylesheet
|
13
12
|
dir = File.expand_path("../templates", __FILE__)
|
14
13
|
case framework_name
|
@@ -27,7 +26,6 @@ module Layout
|
|
27
26
|
end
|
28
27
|
end
|
29
28
|
|
30
|
-
# Add Devise views
|
31
29
|
def add_devise_views
|
32
30
|
copy_file 'sessions/new.html.erb', 'app/views/devise/sessions/new.html.erb'
|
33
31
|
copy_file 'passwords/new.html.erb', 'app/views/devise/passwords/new.html.erb'
|
@@ -35,6 +33,28 @@ module Layout
|
|
35
33
|
copy_file 'registrations/edit.html.erb', 'app/views/devise/registrations/edit.html.erb'
|
36
34
|
end
|
37
35
|
|
36
|
+
def add_name_field
|
37
|
+
if Object.const_defined?('User')
|
38
|
+
if User.column_names.include? 'name'
|
39
|
+
gsub_file 'app/views/devise/registrations/new.html.erb', /:autofocus => true, /, ''
|
40
|
+
gsub_file 'app/views/devise/registrations/edit.html.erb', /:autofocus => true, /, ''
|
41
|
+
inject_into_file 'app/views/devise/registrations/new.html.erb', name_field, :before => " <%= f.label :email %>"
|
42
|
+
inject_into_file 'app/views/devise/registrations/edit.html.erb', name_field, :before => " <%= f.label :email %>"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def name_field
|
50
|
+
<<-TEXT
|
51
|
+
<%= f.label :name %>
|
52
|
+
<%= f.text_field :name, :autofocus => true, class: 'form-control' %>
|
53
|
+
</div>
|
54
|
+
<div class="form-group">
|
55
|
+
TEXT
|
56
|
+
end
|
57
|
+
|
38
58
|
end
|
39
59
|
end
|
40
60
|
end
|
data/lib/rails_layout/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_layout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
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-02-
|
11
|
+
date: 2014-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.2.
|
148
|
+
rubygems_version: 2.2.2
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: Rails generator creates application layout files for Bootstrap and other
|