Seemingly simple issue I can't seem to think around. I'm not even sure if this can be solved with RoR.
I have two partials that I'm rendering on the same page:
<%= render 'large_image_feed' %>
<%= render 'small_image_feed' %>
Both partials look like this:
<% @feed.each do |f| %>
<style>
p img { width: 100%; <%# width: 50%; in small_image_feed %> }
</style>
<p>
<img src="example.jpg">
</p>
<% end %>
The problem is, since _small_image_feed is rendered below _large_image_feed, every image on the page has a 50% width instead of the width being dependant on the partial it is from. The images must be the default img class.