keeps giving me grief when profile is nil... what can i do?
Always check if a variable is nil
before using it in a view.
<% image_tag this.profile.expiring_url(180) unless this.profile.nil? %>
I'm sure there's a more elegant solution to the problem, but that should get you started.
This should work, too
<%= image_tag(this.profile.expiring_url(180)) rescue "no image!" %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With