Actions
Bug #11851
closedLookupKey deprecation warning on overriding of ActiveRecord::Base.inherited
Description
Using the LookupKey base class can result in the following deprecation warning from Rails:
2.0.0-p353 :001 > LookupKey.all LookupKey Load (3.6ms) SELECT "lookup_keys".* FROM "lookup_keys" ORDER BY lookup_keys.key 2015-09-16T14:23:26 [app] [W] DEPRECATION WARNING: It looks like something (probably a gem/plugin) is overriding the ActiveRecord::Base.inherited method. It is important that this hook executes so that your models are set up correctly. A workaround has been added to stop this causing an error in 3.2, but future versions will simply not work if the hook is overridden. If you are using Kaminari, please upgrade as it is known to have had this problem. | | The following may help track down the problem: ["/home/dcleal/code/foreman/foreman/app/models/lookup_keys/lookup_key.rb", 34] | | (called from irb_binding at (irb):1)
It appears that the LookupKey.inherited method isn't calling "super".
This causes logging when used on develop as shown above, or with the PR for #9981.
Updated by Dominic Cleal over 9 years ago
- Related to Refactor #10832: Make LookupKey an STI for puppet and variable keys added
Updated by The Foreman Bot over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2737 added
- Pull request deleted (
)
Updated by Shlomi Zadok over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 8f14d696e48fdd21e6c45af5797673ee9a429614.
Actions