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.102 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.101 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.100 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.99 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.98 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.97 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.96 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.95 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.94 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.93 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.92 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.91 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.90 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.89 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.88 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.87 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.86 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.85 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.84 app/helpers/ish_manager/application_helper.rb
ish_manager-0.1.8.83 app/helpers/ish_manager/application_helper.rb