Sha256: b3c77f60e540d89c0ad90da99beadacc85b15a22840b36786463a631f1b29947

Contents?: true

Size: 683 Bytes

Versions: 6

Compression:

Stored size: 683 Bytes

Contents

module Adherent
  module ApplicationHelper
    
    
    def icon_to(icon_file, options={}, html_options={})
      raise ArgumentError unless icon_file
      title = alt = icon_file.split('.')[0].capitalize

      html_options[:title] ||=title
      html_options[:class] ||= 'icon_menu'
      # html_options[:tabindex]= "-1"
      img_path="adherent/icones/#{icon_file}"
      link_to image_tag(img_path, :alt=> alt), options, html_options
    end
    
    # Pour transformer un montant selon le format numérique français avec deux décimales
    def virgule(montant)
      ActionController::Base.helpers.number_with_precision(montant, precision:2) rescue '0,00'
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
adherent-0.1.1 app/helpers/adherent/application_helper.rb
adherent-0.1.0 app/helpers/adherent/application_helper.rb
adherent-0.0.9 app/helpers/adherent/application_helper.rb
adherent-0.0.7 app/helpers/adherent/application_helper.rb
adherent-0.0.6 app/helpers/adherent/application_helper.rb
adherent-0.0.5 app/helpers/adherent/application_helper.rb