Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyBen committed Feb 22, 2023
1 parent 7fcb27f commit d0ce5d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/madness/server_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def log(obj)
# Search for static file, first in the users docroot, then in the template
# directory.
def find_static_file(path)
return nil if disallowed_static(path)
return nil if disallowed_static?(path)

candidates = [
"#{config.path}/#{path}",
Expand All @@ -39,7 +39,7 @@ def find_static_file(path)
nil
end

def disallowed_static(path)
def disallowed_static?(path)
path.end_with?('.md') || path.empty? || File.basename(path).start_with?('.')
end
end
Expand Down

0 comments on commit d0ce5d7

Please sign in to comment.