lib/fatcow/model.rb in fatcow-0.1.6 vs lib/fatcow/model.rb in fatcow-0.1.7
- old
+ new
@@ -1,11 +1,10 @@
# frozen_string_literal: true
module Fatcow
module Model
extend ActiveSupport::Concern
- include ActionView::Helpers::AssetTagHelper
DEFAULT_SHOW_STATUSES = {
add: -> { new_record? },
burn: -> { destroyed? }
}
@@ -42,10 +41,9 @@
end
def custom_icon(status, **options)
icon = self.class.const_get :FATCOW_ICON
- icon.app = self if icon.app.nil?
icon.status = status if icon.status != status
icon.size = options[:size] if options[:size] && icon.size != options[:size]
icon.size = :regular if !options[:size] && icon.size != :regular
icon