You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling any scoped action on a model that inherits act_as_paranoid from an abstract class postgresql has a type error. "TypeError: no implicit conversion of nil into String"
This can be avoided by putting act_as_paranoid on the child class.
TypeError: no implicit conversion of nil into String
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/postgresql/utils.rb:24:in`quote_ident'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/postgresql/utils.rb:24:in `quoted'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/postgresql/quoting.rb:31:in`quote_table_name'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/to_sql.rb:776:in `quote_table_name'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/to_sql.rb:711:in`visit_Arel_Attributes_Attribute'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/reduce.rb:13:in `visit'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/to_sql.rb:675:in`visit_Arel_Nodes_Equality'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/reduce.rb:13:in `visit'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/to_sql.rb:794:in`block in inject_join'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/to_sql.rb:792:in `each'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/to_sql.rb:792:in`each_with_index'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/to_sql.rb:792:in `each'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/to_sql.rb:792:in`inject'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/to_sql.rb:792:in `inject_join'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/to_sql.rb:650:in`visit_Arel_Nodes_And'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/reduce.rb:13:in `visit'
... 9 levels...
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/arel-6.0.3/lib/arel/visitors/reduce.rb:7:in`accept'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/database_statements.rb:12:in `to_sql'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in`select_all'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/query_cache.rb:70:in `select_all'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/querying.rb:39:in`find_by_sql'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/relation.rb:639:in `exec_queries'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/relation.rb:515:in`load'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/relation.rb:243:in `to_a'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/relation.rb:630:in`inspect'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/console.rb:110:in `start'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/console.rb:9:in`start'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:68:in `console'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in`run_command!'
from /Users/derenge/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in`require'
from bin/rails:4:in `<main>'irb(main):007:0>
The text was updated successfully, but these errors were encountered:
Did anyone figure out a solution to this for Rails 4 other than putting acts_as_paranoid on the Child class? I know I've had this pattern work in Rails 5...
When calling any scoped action on a model that inherits act_as_paranoid from an abstract class postgresql has a type error. "TypeError: no implicit conversion of nil into String"
This can be avoided by putting act_as_paranoid on the child class.
migration
Steps to reproduce:
Call
Child.all
Stack trace
The text was updated successfully, but these errors were encountered: