Sha256: 180234e23bef18a606e2b182467ac2344b0e25e0464c84589486c64b24a4b918

Contents?: true

Size: 459 Bytes

Versions: 41

Compression:

Stored size: 459 Bytes

Contents

require 'spec_helper'

module Ransack
  describe Translate do

    describe '.attribute' do
      it 'translate namespaced attribute like AR does' do
        ar_translation = ::Namespace::Article.human_attribute_name(:title)
        ransack_translation = Ransack::Translate.attribute(
          :title,
          :context => ::Namespace::Article.ransack.context
          )
        expect(ransack_translation).to eq ar_translation
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 4 rubygems

Version Path
ransack-3.2.1 spec/ransack/translate_spec.rb
ransack-3.2.0 spec/ransack/translate_spec.rb
ransack-3.1.0 spec/ransack/translate_spec.rb
ransack-3.0.1 spec/ransack/translate_spec.rb
ransack-3.0.0 spec/ransack/translate_spec.rb
ransack-2.6.0 spec/ransack/translate_spec.rb
ransack-2.5.0 spec/ransack/translate_spec.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/ransack-2.4.2/spec/ransack/translate_spec.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/ransack-2.4.2/spec/ransack/translate_spec.rb
ransack-2.4.2 spec/ransack/translate_spec.rb
ransack-2.4.1 spec/ransack/translate_spec.rb
ransack-2.4.0 spec/ransack/translate_spec.rb
ransack-2.3.2 spec/ransack/translate_spec.rb
ransack-2.3.1 spec/ransack/translate_spec.rb
ransack-2.3.0 spec/ransack/translate_spec.rb
ransack-1.8.10 spec/ransack/translate_spec.rb
ransack-2.1.1 spec/ransack/translate_spec.rb
ransack-2.1.0 spec/ransack/translate_spec.rb
ransack-2.0.1 spec/ransack/translate_spec.rb
ransack-2.0.0 spec/ransack/translate_spec.rb