Closed pavel-manylov closed 8 years ago
@rap-kasta PR to add super
there is welcome ;)
Ran into the same issue with Rails 4.2.6, though the stacktrace was more cryptic:
/Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:9:in `relation_delegate_class': undefined method `[]' for nil:NilClass (NoMethodError)
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:112:in `relation_class_for'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:106:in `create'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/core.rb:254:in `relation'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/scoping/named.rb:33:in `default_scoped'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/scoping/named.rb:28:in `all'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:847:in `get_all_versions'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:858:in `needs_migration?'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:396:in `load_schema_if_pending!'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:411:in `block in maintain_test_schema!'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:642:in `suppress_messages'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:416:in `method_missing'
from /Users/gert/.gem/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:411:in `maintain_test_schema!'
from /Users/gert/projects/philips/eit/repository/bpm-api/spec/rails_helper.rb:30:in `<top (required)>'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in `require'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in `block in requires='
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in `each'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1295:in `requires='
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:109:in `block in process_options_into'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:108:in `each'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:108:in `process_options_into'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration_options.rb:21:in `configure'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:105:in `setup'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:in `run'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in `run'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in `invoke'
from /Users/gert/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/exe/rspec:4:in `<top (required)>'
from /Users/gert/.gem/ruby/2.3.0/bin/rspec:23:in `load'
from /Users/gert/.gem/ruby/2.3.0/bin/rspec:23:in `<main>'
Patch in the making.
Given some (even empty) model:
ActiveRecord
puts warning (not so promising for actual versions of AR…):In
contracts/decorators.rb:7
method definition there are actually no call tosuper
.