assemblymade/coderwall — pull request #218 by YaroSpace (2014-10-07 14:49:44+00:00)
Title: Bounty 389 undefined method banner

Bug: https://assembly.com/coderwall/bounties/389#
Description: Some users a getting "undefined method banner for nil:NilClass" errors

Cause: when a use is not logged in, `current_user` returns nil, thus causing the `NoMethodError` when `user.banner` gets called from within `location_image_url`.

Fix: removed the else block, forcing to return nil when other conditions are not satisfied.