-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Model] Fix naming with inheritance when using Proxy #887
[Model] Fix naming with inheritance when using Proxy #887
Conversation
before(:all) do | ||
class ::TestBase | ||
extend ActiveModel::Naming | ||
context 'without using proxy' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just move d the tests into a context and changed the way the classes are defined so that they can be redefined with a different superclass in the other context.
TestBase = Class.new do | ||
extend ActiveModel::Naming | ||
|
||
include Elasticsearch::Model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could just copy the required code from Elasticsearch::Model
in here but that would result in tests passing even if the Elasticsearch::Model
changed.
thanks @tmandke ! |
* Add naming inheritance tests when using a proxy * Skip circular call to index_name/document_type when Proxy is used and inheritance is enabled
…ted (#898) * [MODEL] Add warning and documentation about STI support being deprecated (#895) * [MODEL] Add warning and documentation about STI support being deprecated * [MODEL] Minor change to STI deprecation warning * [MODEL] Freeze string constant depreaction warning * [MODEL] Update Readme text about STI deprecation * [Model] Fix naming with inheritance when using Proxy (#887) * Add naming inheritance tests when using a proxy * Skip circular call to index_name/document_type when Proxy is used and inheritance is enabled * [MODEL] Adjust previous cherry-picked commit for 6.x branch * [MODEL] Only warn if inheritance_enabled is set to true
Closes #717 & Closes #585