 <p>I'm not sure if :current_location should be a symbol in your model if block. Calling the current_location method inside an object will resolve to the boolean value of current_location (provided your controller is saving it correctly) so change the code to:</p> <pre><code>def geocode_by_ip_address(offer) if current_location offer.address = request.location.address end end </code></pre> <p>EDIT: Sorry just realised that this is in a helper and not the model, :current_location and current_location should both be undefined in your helper, you would need to pass that logic in (or I would put the if block inside the model and then call geocode_by_ip_address with the if block removed from there)</p>