Sha256: 76179af593b673f4cbdf3e90a00b6bae48f37a06d8d57ca69e722cab676d816a

Contents?: true

Size: 395 Bytes

Versions: 70

Compression:

Stored size: 395 Bytes

Contents

module IshManager
  module ApplicationHelper

    def pretty_date input
      return input.strftime("%Y-%m-%d")
    end

    def pp_errors errors
      return errors
    end

    def user_path user
      if user.class == 'String'
        "/users/#{user}"
      elsif user.class == User
        "/users/#{user.id}"
      elsif user.class == NilClass
        "/users"
      end
    end

  end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
ish_manager-0.1.8.122 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.121 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.120 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.119 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.118 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.117 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.116 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.115 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.114 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.113 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.112 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.111 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.110 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.109 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.108 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.107 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.106 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.105 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.104 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.103 app/helpers/ish_manager/application_helper.rb