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

Include modules instead of reopening classes. #14151

Merged

Commits on Mar 3, 2017

  1. Use the already included module instead of reopening classes.

    Related to ManageIQ#14128
    
    We should either use RssFeed.class_eval to reopen the class to force
    rails to load the RssFeed model first or the technique in this commit,
    which is to just include the module in RssFeed.  Note, this module was
    already being included so there was no reason to reopen the class also.
    
    The existing layout of re-opening the RssFeed with different class
    definitions:
    
    rss_feed/import_export.rb:
    class RssFeed
    
    rss_feed.rb:
    class RssFeed < ApplicationRecord
    
    can cause `TypeError: superclass mismatch for class RssFeed` if
    the import_export.rb is loaded first.
    jrafanie committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    0229960 View commit details
    Browse the repository at this point in the history