Skip to content

360068 - Add missing associations and dependent - #566

Merged
B-Rass merged 1 commit into
nanego:masterfrom
pantographe:360068-improve-associations-for-delete-confirmations
Feb 11, 2026
Merged

360068 - Add missing associations and dependent#566
B-Rass merged 1 commit into
nanego:masterfrom
pantographe:360068-improve-associations-for-delete-confirmations

Conversation

@nicolas-brousse

Copy link
Copy Markdown
Collaborator

No description provided.

@nicolas-brousse nicolas-brousse self-assigned this Jan 14, 2026
@nicolas-brousse
nicolas-brousse force-pushed the 360068-improve-associations-for-delete-confirmations branch 3 times, most recently from beea2c0 to dea9cd6 Compare January 14, 2026 23:13
Comment thread app/models/frame.rb Outdated
@nicolas-brousse
nicolas-brousse force-pushed the 360068-improve-associations-for-delete-confirmations branch 2 times, most recently from 59396b8 to 1cb6e44 Compare February 4, 2026 16:51
@nicolas-brousse
nicolas-brousse marked this pull request as ready for review February 4, 2026 16:51
Comment thread app/models/modele.rb
belongs_to :manufacturer, counter_cache: true
belongs_to :architecture, counter_cache: true
belongs_to :category, counter_cache: true

has_many :servers, dependent: :restrict_with_error
has_many :enclosures, dependent: :destroy

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe great to give a better display names for enclosure than #<Enclosure:0x0000000127f6a158>

Like Enclosure 1 (1 = position)

Comment thread app/models/port_type.rb
@@ -3,7 +3,7 @@
class PortType < ApplicationRecord
has_changelog

has_many :card_types
has_many :card_types, dependent: :restrict_with_error

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It missing the update of the test for the dependency

Comment thread app/views/rooms/destroy.html.erb Outdated
@@ -1,5 +1,4 @@
<%
breadcrumb
breadcrumb

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

erb_lint pranks you

Comment thread app/views/clusters/destroy.html.erb Outdated
@@ -1,5 +1,4 @@
<%
breadcrumb
breadcrumb

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

erb_lint pranks you

@nicolas-brousse
nicolas-brousse force-pushed the 360068-improve-associations-for-delete-confirmations branch 3 times, most recently from 3121d48 to 3daf2a2 Compare February 11, 2026 14:22
Comment thread app/decorators/enclosure_decorator.rb Outdated
def display_name
composants = object.composants.pluck(:name)

composants_sentense = if composants.empty?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
composants_sentense = if composants.empty?
composants_sentence = if composants.empty?

Comment thread app/decorators/enclosure_decorator.rb Outdated
composants.map { |c| c.presence || "n/c" }.to_sentence
end

"#{object.class.model_name.human} #{position} (#{composants_sentense})"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"#{object.class.model_name.human} #{position} (#{composants_sentense})"
"#{object.class.model_name.human} #{position} (#{composants_sentence})"

@nicolas-brousse
nicolas-brousse force-pushed the 360068-improve-associations-for-delete-confirmations branch from 3daf2a2 to dedd7f9 Compare February 11, 2026 14:40
@B-Rass
B-Rass merged commit 8540f7c into nanego:master Feb 11, 2026
6 checks passed
@B-Rass
B-Rass deleted the 360068-improve-associations-for-delete-confirmations branch February 11, 2026 14:51
nicolas-brousse added a commit to pantographe/my-dcim that referenced this pull request May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants