Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5 Deprecation Warning #37

Open
mazikwyry opened this issue Jun 26, 2017 · 0 comments
Open

Rails 5 Deprecation Warning #37

mazikwyry opened this issue Jun 26, 2017 · 0 comments

Comments

@mazikwyry
Copy link

Hey! Great gem! In Rails 5 I can see a deprecation warning like this:

DEPRECATION WARNING: You are passing an instance of ActiveRecord::Base to `find`. Please pass the id of the object by calling `.id`. 

everytime I create new tree node:

tree_item.children.create(itemable: itemable)

Maybe it is only because TreeItem that uses acts_as_ordered_tree is polymorphic.

class TreeItem < ApplicationRecord
  acts_as_ordered_tree

  belongs_to :project
  belongs_to :itemable,
             polymorphic: true,
             inverse_of: :tree_item
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant