MyModel.count == MyModel.with_locale(:it).count
ruby-2.3.1: (develop)$ bin/rspec
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top (required)> at /Users/nicolaiseerup/Sites/Soundtracktor/soundtracktor-api/config/environment.rb:5)
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from <top (required)> at /Users/nicolaiseerup/Sites/Soundtracktor/soundtracktor-api/spec/rails_helper.rb:9)
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from <top (required)> at /Users/nicolaiseerup/Sites/Soundtracktor/soundtracktor-api/app/controllers/application_controller.rb:2)
Run options: include {:focus=>true}
Randomized with seed 27854
Daemon has started successfully
An error occurred in a `before(:suite)` hook.
Failure/Error: DatabaseCleaner.clean_with(:truncation)
ActiveRecord::StatementInvalid:
PG::ConnectionBad: PQsocket() can't get socket descriptor: SELECT schemaname || '.' || tablename
FROM pg_tables
WHERE
tablename !~ '_prt_' AND
tablename <> 'schema_migrations' AND
schemaname = ANY (current_schemas(false))
# /Users/nicolaiseerup/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `async_exec’
validates :label, uniqueness: true
translate_class.class_eval do
validates :label, uniqueness: true
end
translates
are missing from Model.attribute_names
:O
translates
line, the columns suddenly appear back in the list