Skip to content

Commit

Permalink
Remove unused parameters and unnecessary parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
Guo Yunhe committed Jul 1, 2017
1 parent 71c89ea commit 1f80f50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/models/screenshot.rb
Expand Up @@ -60,7 +60,7 @@ def blob(type = :screenshot)
if cached?
cached_blob(type)
elsif source_url.nil?
default_blob(type)
default_blob
else
begin
fetch
Expand All @@ -73,7 +73,7 @@ def blob(type = :screenshot)
rescue Exception => e
raise unless Rails.env.production?
Rails.logger.debug("No screenshot fetched (blob) for: " + pkg_name)
default_blob(type)
default_blob
end
end
end
Expand All @@ -92,8 +92,8 @@ def cached_blob(type)
end
end

def default_blob(type)
open(default_file_path(), "rb", &:read)
def default_blob
open(default_file_path, "rb", &:read)
end

def cache_key
Expand Down

0 comments on commit 1f80f50

Please sign in to comment.