Sha256: 372b3a326da4c4183ff18c0d9e135e7565e60fe40527b683d22502ff629af8eb

Contents?: true

Size: 1.74 KB

Versions: 21

Compression:

Stored size: 1.74 KB

Contents

# frozen_string_literal: true

module Thredded
  class Error < StandardError
  end

  module Errors
    class DatabaseEmpty < Thredded::Error
      def message
        'Seed the database with "rake db:seed".'
      end
    end

    class LoginRequired < Thredded::Error
      def message
        I18n.t('thredded.errors.login_required')
      end
    end

    class UserNotFound < Thredded::Error
      def message
        'This user could not be found. Is their name misspelled?'
      end
    end

    class PrivateTopicNotFound < Thredded::Error
      def message
        I18n.t('thredded.errors.private_topic_not_found')
      end
    end

    class PrivatePostNotFound < Thredded::Error
      def message
        I18n.t('thredded.errors.private_post_not_found')
      end
    end

    class TopicNotFound < Thredded::Error
      def message
        I18n.t('thredded.errors.topic_not_found')
      end
    end

    class PostNotFound < Thredded::Error
      def message
        I18n.t('thredded.errors.post_not_found')
      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 MessageboardCreateDenied < Thredded::Error
      def message
        'You are not authorized to create a new messageboard.'
      end
    end

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

    class PrivateTopicCreateDenied < Thredded::Error
      def message
        I18n.t('thredded.errors.private_topic_create_denied')
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
thredded-1.1.0 lib/thredded/errors.rb
thredded-1.0.1 lib/thredded/errors.rb
thredded-1.0.0 lib/thredded/errors.rb
thredded-0.16.16 lib/thredded/errors.rb
thredded-0.16.15 lib/thredded/errors.rb
thredded-0.16.14 lib/thredded/errors.rb
thredded-0.16.13 lib/thredded/errors.rb
thredded-0.16.12 lib/thredded/errors.rb
thredded-0.16.11 lib/thredded/errors.rb
thredded-0.16.10 lib/thredded/errors.rb
thredded-0.16.9 lib/thredded/errors.rb
thredded-0.16.8 lib/thredded/errors.rb
thredded-0.16.7 lib/thredded/errors.rb
thredded-0.16.6 lib/thredded/errors.rb
thredded-0.16.5 lib/thredded/errors.rb
thredded-0.16.4 lib/thredded/errors.rb
thredded-0.16.3 lib/thredded/errors.rb
thredded-0.16.1 lib/thredded/errors.rb
thredded-0.16.0 lib/thredded/errors.rb
thredded-0.15.5 lib/thredded/errors.rb