Sha256: acd9f86e0c5131a7f6e4aad18d9c27f216cfe2d57de88d93176dd07f1117b19c

Contents?: true

Size: 827 Bytes

Versions: 1

Compression:

Stored size: 827 Bytes

Contents

module Thredded
  class Error < StandardError
  end

  module Errors
    class TopicNotFound < Thredded::Error
      def message
        'This topic does not exist.'
      end
    end

    class MessageboardNotFound < Thredded::Error
      def message
        'This messageboard does not exist.'
      end
    end

    class MessageboardReadDenied < Thredded::Error
      def message
        'You are not authorized access to this messageboard.'
      end
    end

    class TopicCreateDenied < Thredded::Error
      def message
        'You are not authorized to post in this messageboard.'
      end
    end

    class EmptySearchResults < Thredded::Error
      def initialize(query)
        @query = query
      end

      def message
        "There are no results for your search - '#{@query}'"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
thredded-0.0.12 lib/thredded/errors.rb