rails_layout 1.0.25 → 1.0.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05a8bf021d5ae1aa188562e400f2f6dfe2503d5d
4
- data.tar.gz: d912f1ead3b545cfad1a24bf97eb32f057bc0cb9
3
+ metadata.gz: e229fa2a209b9e826992509aa863411675755c87
4
+ data.tar.gz: 920f971e942ab205bdd246e17d8f5d93334199f0
5
5
  SHA512:
6
- metadata.gz: fa6fd0397eb1f89edcc51986a8ce2efe7623f3ea5a215527521888c254b5d09cfca8a9cbc15ed22cb138ba977b905aa718f2ab821cb06098176906aeae09de36
7
- data.tar.gz: fbb2946795593cf59b33cf45a650f18d3c271072f4858477fc4cd3ce87eb09b2733215d81e9a0c26466bb6ddfb58f120c5f73f27027a9069de6007fe19018895
6
+ metadata.gz: ba0a3634fb67fe98836bc08c8bf0ec0b8c58444b5d9511989cee1dd7e5f736c107beea0679820826f9a32b6a0159541c10bd02a09fe9cbec7dd6a66109ee92b1
7
+ data.tar.gz: b94fd188b6f0c4ed8d3b82286b2a6629e03f5b7f366b0e1b79fc2ce1333b0d861228f34cc5b71c9dbfb9c3c7c9ac1a4d50ee8b8661b2e79cf45ab7e3fec0078a
@@ -0,0 +1 @@
1
+ rails-layout
@@ -0,0 +1 @@
1
+ 2.2.2
@@ -1,5 +1,9 @@
1
1
  h1. CHANGELOG
2
2
 
3
+ h3. 1.0.26 May 8, 2015
4
+
5
+ * use Rails 'try' when testing if the current_user is an admin (contributed by bogdanvlviv)
6
+
3
7
  h3. 1.0.25 March 8, 2015
4
8
 
5
9
  * only apply styling for 'error_explanation' when not empty
@@ -46,7 +46,7 @@ LINKS
46
46
  # suitable for role-based authorization
47
47
  append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
48
48
  <% if user_signed_in? %>
49
- <% if current_user.admin? %>
49
+ <% if current_user.try(:admin?) %>
50
50
  <li><%= link_to 'Users', users_path %></li>
51
51
  <% end %>
52
52
  <% end %>
@@ -65,7 +65,7 @@ LINKS
65
65
  # UPMIN (administrative dashboard)
66
66
  if File.exists?('config/initializers/upmin.rb')
67
67
  navlink = " <li><%= link_to 'Admin', '/admin' %></li>"
68
- inject_into_file 'app/views/layouts/_navigation_links.html.erb', navlink + "\n", :after => "<% if current_user.admin? %>\n"
68
+ inject_into_file 'app/views/layouts/_navigation_links.html.erb', navlink + "\n", :after => "<% if current_user.try(:admin?) %>\n"
69
69
  end
70
70
  end
71
71
 
@@ -1,3 +1,3 @@
1
1
  module RailsLayout
2
- VERSION = "1.0.25"
2
+ VERSION = "1.0.26"
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.25
4
+ version: 1.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kehoe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-08 00:00:00.000000000 Z
11
+ date: 2015-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -47,6 +47,8 @@ extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
49
  - ".gitignore"
50
+ - ".ruby-gemset"
51
+ - ".ruby-version"
50
52
  - CHANGELOG.textile
51
53
  - Gemfile
52
54
  - LICENSE.txt
@@ -147,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
149
  version: '0'
148
150
  requirements: []
149
151
  rubyforge_project:
150
- rubygems_version: 2.4.5
152
+ rubygems_version: 2.4.6
151
153
  signing_key:
152
154
  specification_version: 4
153
155
  summary: Rails generator creates application layout files for Bootstrap and other