Sha256: 277849373a9479de59ea72ad0aafa7e551cdef5206bf8de3fda94456c9632887

Contents?: true

Size: 569 Bytes

Versions: 17

Compression:

Stored size: 569 Bytes

Contents

module Errdo
  module Helpers
    module ViewsHelper
      def user_show_string(user)
        if user.respond_to?(Errdo.user_string_method || "")
          user.send(Errdo.user_string_method)
        elsif user
          user.class.to_s + " #" + user.id.to_s
        else
          ""
        end
      end

      def user_show_path(user)
        if Errdo.user_show_path && user
          Rails.application.routes.url_helpers.send(Errdo.user_show_path, user)
        end
      end

      def user_show_url(user)
        user_show_path(user)
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
errdo-0.12.14 lib/errdo/helpers/views_helper.rb
errdo-0.12.13 lib/errdo/helpers/views_helper.rb
errdo-0.12.12 lib/errdo/helpers/views_helper.rb
errdo-0.12.11 lib/errdo/helpers/views_helper.rb
errdo-0.12.10 lib/errdo/helpers/views_helper.rb
errdo-0.12.9 lib/errdo/helpers/views_helper.rb
errdo-0.12.8 lib/errdo/helpers/views_helper.rb
errdo-0.12.7 lib/errdo/helpers/views_helper.rb
errdo-0.12.6 lib/errdo/helpers/views_helper.rb
errdo-0.12.5 lib/errdo/helpers/views_helper.rb
errdo-0.12.4 lib/errdo/helpers/views_helper.rb
errdo-0.12.3 lib/errdo/helpers/views_helper.rb
errdo-0.12.2 lib/errdo/helpers/views_helper.rb
errdo-0.12.1 lib/errdo/helpers/views_helper.rb
errdo-0.12.0 lib/errdo/helpers/views_helper.rb
errdo-0.11.6 lib/errdo/helpers/views_helper.rb
errdo-0.11.5 lib/errdo/helpers/views_helper.rb