From b21db9bbde3784556a5861e2cdec0c8c2184c72e Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Wed, 6 Dec 2017 19:41:57 +0900 Subject: Using double splat operator (#5859) --- app/models/remote_follow.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/remote_follow.rb') diff --git a/app/models/remote_follow.rb b/app/models/remote_follow.rb index c3f867743..070144e2d 100644 --- a/app/models/remote_follow.rb +++ b/app/models/remote_follow.rb @@ -7,8 +7,8 @@ class RemoteFollow validates :acct, presence: true - def initialize(attrs = {}) - @acct = attrs[:acct].gsub(/\A@/, '').strip unless attrs[:acct].nil? + def initialize(attrs = nil) + @acct = attrs[:acct].gsub(/\A@/, '').strip if !attrs.nil? && !attrs[:acct].nil? end def valid? -- cgit