當與RSpec中的I18n的翻譯測試Ruby代碼,我得到的錯誤是這樣的: translation missing: en.lib.filter.equal_to
這裏有一個簡單的例子: def word_for_operator
I18n.t('lib.filter.equal_to')
end
規格: it "returns the correct label" do
這些都是我的模型 class Employee < ActiveRecord::Base
has_many addresses, as: :locatable
end
class Client < ActiveRecord::Base
has_many addresses, as: :locatable
end
class Address < ActiveRecor
在我config.routes.rb文件: scope '(:locale)' do
resources :techniques, path: '/applications' do
get '/complete_list' => 'techniques#complete_list'
end
end
在我Gemfile: group :development,