<% p = @product v = @variant error_message = nil if @highlight_variant_id # Make sure we're not trying to highlight a deleted variant v = Caboose::Variant.where(:id => @highlight_variant_id).first if v.nil? error_message = "

The variant you want to highlight is not in the database.

" elsif v.status == 'Deleted' error_message = "

The variant you want to highlight has been deleted.

" end end %> <%= render :partial => 'caboose/products/admin_header' %>
<%= error_message %>
<%= render :partial => 'caboose/products/admin_footer' %> <% content_for :caboose_css do %> <% end %> <% content_for :caboose_js do %> <% end %>