Sha256: 80cc7e56e18fcdc0476c3c9b026a8917fc682bbbcf06fdd7d0bf1a01f6904d37

Contents?: true

Size: 593 Bytes

Versions: 20

Compression:

Stored size: 593 Bytes

Contents

module C80Yax
  module Cats
    module CatViewHelper

      # выдать html строку с image_tag картинки категории
      def cat_image_tag(cat, thumb_type = 'thumb_md')
        res = ''
        if cat.image.present?
          res = image_tag cat.image.thumb_md
        end
        res.html_safe
      end

      # выдать урл картинки категории
      def cat_image_url(cat, thumb_type = 'thumb_md')
        res = ''
        if cat.image.present?
          res = cat.image.send(thumb_type)
        end
        res
      end

    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
c80_yax-0.1.0.25 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.24 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.23 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.22 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.21 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.20 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.18 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.17 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.16 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.15 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.14 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.13 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.12 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.11 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.10 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.9 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.8 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.7 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.6 app/helpers/c80_yax/cats/cat_view_helper.rb
c80_yax-0.1.0.5 app/helpers/c80_yax/cats/cat_view_helper.rb