Sha256: 9b205fa4e9ca3163f5d47e9e48ea79b37a1b6c647935b047a101c87f1c5d6b70

Contents?: true

Size: 538 Bytes

Versions: 4

Compression:

Stored size: 538 Bytes

Contents

module Cream::Helper
  module AuthLabel          
    def auth_labels
      @auth_labels ||= translate_labels
    end

    def translate_labels
      ns_actions = 'cream.actions'
      labels = {}
      %w{new edit delete show sign_in sign_out sign_up edit_registration}.each do |action|     
        labels[action.to_sym] = t "#{ns_actions}.#{action}"
      end 
      labels[:confirm] = t 'cream.confirm'
      labels           
    end 
    
    def self.included(base)
      base.helper_method :auth_labels
    end         
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cream-0.5.9 lib/cream/helper/authlabels.rb
cream-0.5.8 lib/cream/helper/authlabels.rb
cream-0.5.7 lib/cream/helper/authlabels.rb
cream-0.5.6 lib/cream/helper/authlabels.rb