Sha256: 7a0d9ff7d6db87d5dac507ab51b7325703b68561d447c11ea04c546190f844ee

Contents?: true

Size: 656 Bytes

Versions: 118

Compression:

Stored size: 656 Bytes

Contents

# frozen_string_literal: true

module Tramway
  module Admin
    module RussianCasesHelper
      def case_word(model_name, case_name)
        word_case = I18n.t("cases.#{model_name.name.underscore}.#{case_name}")
        return word_case if word_case.present?

        raise "There is not #{case_name} implementation for \"#{model_name}\""
      end

      def genitive(word)
        case_word word, :genitive
      end

      def instrumental(word)
        case_word word, :instrumental
      end

      def dative(word)
        case_word word, :dative
      end

      def russian_plural(word)
        case_word word, :plural
      end
    end
  end
end

Version data entries

118 entries across 118 versions & 1 rubygems

Version Path
tramway-admin-5.0 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.1.2.1 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.1.2 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.1.1.5 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.1.1.4 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.1.1.3 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.1.1.2 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.1.1.1 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.1.1 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.1.0.1 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.1 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.0.1.1 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.0.1 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.0.0.1 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-4.0 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-3.0.1.1 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-3.0.1 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-3.0 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-2.1.3.3 app/helpers/tramway/admin/russian_cases_helper.rb
tramway-admin-2.1.3.2 app/helpers/tramway/admin/russian_cases_helper.rb