Sha256: 64d42302b4a1cfba11086fa097ae7f33e402a4e5880e82dea48f8b5d29e5c0bd

Contents?: true

Size: 538 Bytes

Versions: 7

Compression:

Stored size: 538 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)
        else
          errdo.root_path
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
errdo-0.11.3 lib/errdo/helpers/views_helper.rb
errdo-0.11.2 lib/errdo/helpers/views_helper.rb
errdo-0.11.1 lib/errdo/helpers/views_helper.rb
errdo-0.11.0 lib/errdo/helpers/views_helper.rb
errdo-0.10.0 lib/errdo/helpers/views_helper.rb
errdo-0.9.1 lib/errdo/helpers/views_helper.rb
errdo-0.9.0 lib/errdo/helpers/views_helper.rb