My problem is that whenever html content is image, I want it to be class="img-responsive". Otherwise big images are looking horrible.
I tried to set class of parent div to img-responsive but somehow it doesn't get inherited.
So I'm trying to add this CSS class to following Ruby injection somehow:
<%= raw(activity.trackable.content_html) %>
I tried this
<%= raw(activity.trackable.content_html), :class => "img-responsive" %> but gives syntax error.
activity.trackable.content_htmllook like?<p><img src="https://upload.wikimedia.org/wikipedia/commons/f/fc/Sahelanthropus_tchadensis_-_TM_266-01-060-1.jpg" alt=""/></p>