ManageIQ / activerecord-virtual_attributes

VirtualAttributes allows you to define a ruby method that acts like an attribute or relation.
Apache License 2.0
9 stars 12 forks source link

Remove NonARModels #155

Open kbrock opened 4 months ago

kbrock commented 4 months ago

Not sure why we need these changes, but they feel unrelated to virtual attributes.

May want to move this into the non-ar backed models.

This is at the top of virtual_fields

      module NonARModels
        def dangerous_attribute_method?(_); false; end
        def generated_association_methods; self; end
        def add_autosave_association_callbacks(*_args); self; end
        def belongs_to_required_by_default; false; end
      end

      included do
        unless respond_to?(:dangerous_attribute_method?)
          extend NonARModels
        end
      end
miq-bot commented 3 weeks ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.