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

fixes #5788 - before_destroy missing from EnsureNotUsedBy.new in SmartProxy model #1453

Closed
wants to merge 1 commit into from

Conversation

isratrade
Copy link
Member

No description provided.

@@ -4,7 +4,7 @@ class SmartProxy < ActiveRecord::Base
audited :allow_mass_assignment => true

attr_accessible :name, :url, :location_ids, :organization_ids
EnsureNotUsedBy.new(:hosts, :hostgroups, :subnets, :domains, :puppet_ca_hosts, :puppet_ca_hostgroups)
before_destroy EnsureNotUsedBy.new(:hosts, :hostgroups, :subnets, :domains, :puppet_ca_hosts, :puppet_ca_hostgroups)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

realms too, come to think of it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

realm.rb has before_destroy

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, but this line is checking that the proxy isn't used on another resource, so we should probably ensure it's not used by a realm too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed and re-committed.

@domcleal
Copy link
Contributor

Merged as f20ddfe for Foreman 1.5.1, thanks @isratrade.

@domcleal domcleal closed this May 20, 2014
ares added a commit to ares/foreman that referenced this pull request Jul 7, 2015
ares added a commit to ares/foreman that referenced this pull request Jul 7, 2015
ares added a commit to ares/foreman that referenced this pull request Jul 10, 2015
ares added a commit to ares/foreman that referenced this pull request Jul 15, 2015
ares added a commit to ares/foreman that referenced this pull request Aug 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants