Sha256: f9e0cb3ed554df3e20eb463d06c428ecda057f1f5b0f1b3142fd14a5188b4f5c

Contents?: true

Size: 758 Bytes

Versions: 2

Compression:

Stored size: 758 Bytes

Contents

# encoding: utf-8
require File.dirname(__FILE__) + '/../../lib/active_extend/string_helper.rb'
module ApplicationHelper
  
  include StringHelper
  
  # Returns the full title on a per-page basis.
    def full_title(page_title)
      base_title = I18n.t("crm.title.full")
      if page_title.empty?
        base_title
      else
        "#{base_title} | #{page_title}"
      end
    end
    
    def title()
      I18n.t("crm.title.small")
    end
    
    def pluralize_without_count(count, noun, text = nil)
      if count != 0
        count == 1 ? "#{noun}#{text}" : "#{noun.pluralize}#{text}"
      end
    end
    
    def puts_on_file(file, string=nil)
      aFile = File.new(file, "w")
      aFile.write(string || yield)
      aFile.close
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
guara-0.0.3 app/helpers/application_helper.rb
guara-0.0.1.rc app/helpers/application_helper.rb