Sha256: 58de2bb0f1e3e573df7725048b62a905b5ea0eba6f879a9d68661ceed25207d6

Contents?: true

Size: 1.29 KB

Versions: 18

Compression:

Stored size: 1.29 KB

Contents

module Bhf
  module ApplicationHelper

    def show_t(platform)
      t("bhf.helpers.entry.models.#{platform.model_name}.show", platform_title: platform.title_singular, default: t('bhf.helpers.entry.show')).html_safe
    end

    def new_t(platform)
      t("bhf.helpers.entry.models.#{platform.model_name}.new", platform_title: platform.title_singular, default: t('bhf.helpers.entry.new')).html_safe
    end

    def duplicate_t(platform)
      t("bhf.helpers.entry.models.#{platform.model_name}.duplicate", platform_title: platform.title_singular, default: t('bhf.helpers.entry.duplicate')).html_safe
    end

    def edit_t(platform)
      t("bhf.helpers.entry.models.#{platform.model_name}.edit", platform_title: platform.title_singular, default: t('bhf.helpers.entry.edit')).html_safe
    end

    def delete_t(platform)
      t("bhf.helpers.entry.models.#{platform.model_name}.delete", platform_title: platform.title_singular, default: t('bhf.helpers.entry.delete')).html_safe
    end
    
    def find_smallest_size_url_for_file(file)
      if file.exists?(:thumb)
        file.url(:thumb)
      elsif file.exists?(:medium)
        file.url(:medium)
      else
        file.url
      end
    end

    def type_is_image?(type)
      Bhf.configuration.paperclip_image_types.include?(type)
    end
    
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
bhf-0.10.10 app/helpers/bhf/application_helper.rb
bhf-0.10.9 app/helpers/bhf/application_helper.rb
bhf-0.9.9 app/helpers/bhf/application_helper.rb
bhf-0.9.8 app/helpers/bhf/application_helper.rb
bhf-0.9.7 app/helpers/bhf/application_helper.rb
bhf-0.9.6 app/helpers/bhf/application_helper.rb
bhf-0.9.5 app/helpers/bhf/application_helper.rb
bhf-0.9.4 app/helpers/bhf/application_helper.rb
bhf-0.9.3 app/helpers/bhf/application_helper.rb
bhf-0.9.2 app/helpers/bhf/application_helper.rb
bhf-0.9.1 app/helpers/bhf/application_helper.rb
bhf-0.9.0 app/helpers/bhf/application_helper.rb
bhf-0.8.7 app/helpers/bhf/application_helper.rb
bhf-0.8.6 app/helpers/bhf/application_helper.rb
bhf-0.8.5 app/helpers/bhf/application_helper.rb
bhf-0.8.4 app/helpers/bhf/application_helper.rb
bhf-0.8.3 app/helpers/bhf/application_helper.rb
bhf-0.8.2 app/helpers/bhf/application_helper.rb