Skip to content

undefined method merge! for conditions with raw sql #12

@jogaco

Description

@jogaco

I have this:

    has_many :other_credits, :class_name => 'Credit', :as => :creditable, integer_type: true, 
                     :conditions => ['credit_role_id NOT IN (?)', [ROLE1, ROLE2, ROLE3]] 

And this is the error when trying to use polymorphic_integer_type:

NoMethodError: undefined method `merge!' for ["credit_role_id NOT IN (?)", [1, 2, 3]]:Array
/home/user/.rvm/gems/ruby-2.1.2@myproject/gems/polymorphic_integer_type-1.0.5/lib/polymorphic_integer_type/extensions.rb:51:in `remove_type_and_establish_mapping'
/home/user/.rvm/gems/ruby-2.1.2@myproject/gems/polymorphic_integer_type-1.0.5/lib/polymorphic_integer_type/extensions.rb:56:in `has_many'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions