rails_layout 1.0.7 → 1.0.8

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: 913fa9b0ba9defd19191923a7f8aea57d3cd703c
4
- data.tar.gz: 46779058a67b6d3f7e6ead5ef26ca05e6568fd6b
3
+ metadata.gz: 3a34977f189247017c4024017cad732c4e1ba486
4
+ data.tar.gz: 5cdd77e8427c3938e8314d1fa71ee426f9cf081d
5
5
  SHA512:
6
- metadata.gz: 3390e2e82341dc16307268f493b0eca89ebbb19ab3d132ffd5a495faff4f7edcac53235505da5125651a758c750bd74b85e056100d182bd320efe919293018f0
7
- data.tar.gz: c8500ff57f65b1f99fc6fafdfe89d7122eb6218394a2b862bbefea491366cb71d534fa0a460faf6984e9b376d349053666c9e60c01dab8e376a5afdeb86e6e63
6
+ metadata.gz: 4fa7173a4fbc11bc09a0b9940a06ad648884dfeaf59f016969651715af7d92b5a04db2c179eec52db074f9ce239f72341e85f11386fcffc1efbe2ac8be93d628
7
+ data.tar.gz: 6ccc8b3c0741d70514b8a2fa7ffcc5f26f375bac977016db1b967500565bcbe943ee087ffcb0e9226b7fefad788f013787acc21b2c3492677854fe5c59c8f224
data/CHANGELOG.textile CHANGED
@@ -1,5 +1,9 @@
1
1
  h1. CHANGELOG
2
2
 
3
+ h3. 1.0.8 February 24, 2014
4
+
5
+ * add 'name' field to Devise registration forms if 'name' is an attribute in the User object
6
+
3
7
  h3. 1.0.7 February 15, 2014
4
8
 
5
9
  * generate Devise navigation links when Devise initializer is present
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 5.0.3 was released January 15, 2014. 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, so use 5.0.3 or newer with Rails.
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
@@ -1,3 +1,3 @@
1
1
  module RailsLayout
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
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.7
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-16 00:00:00.000000000 Z
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.0
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