Skip to content

Commit 6252ea4

Browse files
committed
remove simplecov and fix is_admin?
1 parent d88166d commit 6252ea4

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ source 'https://rubygems.org' do
165165
gem 'database_cleaner'
166166
gem 'fuubar'
167167
gem 'shoulda-matchers'
168-
gem 'simplecov'
169168
gem 'timecop'
170169
gem 'vcr'
171170
gem 'webmock', '<1.16'

Gemfile.lock

-1
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,6 @@ DEPENDENCIES
817817
shoulda-matchers!
818818
sidekiq!
819819
simple_form!
820-
simplecov!
821820
sinatra!
822821
sitemap_generator!
823822
slim-rails!

app/controllers/application_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def require_admin!
199199
end
200200

201201
def is_admin?
202-
signed_in? && current_user.admin?
202+
signed_in? && current_user.role == 'admin'
203203
end
204204

205205
def iphone_user_agent?

0 commit comments

Comments
 (0)