I have following code in my view:
# panel.html.erb
<% if content.content_type == "image" && content.content_image_url =~ URI::ABS_URI %>
<%= image_tag content.content_image.pinboard_thumb %>
<% elsif content.content_image? == false && content.content_value =~ URI::ABS_URI %>
<%= image_tag content.content_value %>
<% else %>
<%= auto_link content.content_value %>
<% end %>
I`m thinking where should I move this logic from if else block. How to do that Rails Way. Move that to helper??
Or is better way? Code below isn`t working.