RailsCasts Pro episodes are now free!

Learn more or hide this

Alexandr Basan's Profile

GitHub User: AlexandrBasan

Comments by Alexandr Basan

Avatar

Using FontAwesome as chevron

def sortable(column, title = nil)
title ||= column.titleize
css_class = column == sort_column ? "current #{sort_direction}" : nil
direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc"
link_to (("#{title} #{content_tag(:i, '', :class => "fa fa-chevron-#{direction == 'asc' ? 'up': 'down'}", :style => "font-size: 6px;") if css_class.present?}").html_safe), params.merge(:sort => column, :direction => direction, :page => nil), {:class => css_class}
end

Avatar

Thank you for your solution!
Cropper.rb have class Cropper < Thumbnail
so
processors => [:cropper, :thumbnail].
This code works perfect.