diff --git a/Gemfile.lock b/Gemfile.lock index 653c20b..b735246 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,7 +27,7 @@ GIT GIT remote: https://github.com/work-design/rails_design.git - revision: 05aac51ebab3df772e64860724abd0c28d6b5801 + revision: 8347a39a95ad59f0c87446b5360db06d1da4b339 specs: rails_design (0.0.1) rails diff --git a/app/models/notice/ext/setting.rb b/app/models/notice/ext/setting.rb index d2fc56a..8c0be1c 100644 --- a/app/models/notice/ext/setting.rb +++ b/app/models/notice/ext/setting.rb @@ -10,7 +10,7 @@ module Ext::Setting end def unread_count - r = counters.fetch('total', 0) + r = counters&.fetch('total', 0) r.to_i end diff --git a/package.gemspec b/package.gemspec index 3e9aad5..a8c7a2a 100644 --- a/package.gemspec +++ b/package.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'rails_notice' s.version = '1.0.3' - s.authors = ['qinmingyuan'] + s.authors = ['Mingyuan Qin'] s.email = ['mingyuan0715@foxmail.com'] s.homepage = 'https://github.com/work-design/rails_notice' s.summary = 'Notification Center for Rails Application'