-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Allow user to delete the scenarios agents with it #1446
Conversation
expect(unique_agent_ids).to eq([agents(:jane_rain_notifier_agent).id]) | ||
end | ||
|
||
it "returns not agents when all are also used in a different scenario" 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.
not == no?
Good idea! |
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> | ||
<h4 class="modal-title"> | ||
<% if scenario == @scenario %> |
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 think this works because in once case @scenario
is nil
? Might be clearer as if @scenario && scenario == @scenario
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.
True, it works because we only assign @scneario
in the show page.
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.
Both are technically fine. I just thought testing @scenario
might be clearer for readability. I don't feel strongly.
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.
Ah, I see you made the change 😄
Looks great! |
73a18bb
to
98fae41
Compare
Thanks! |
The scenario delete button now opens a modal in which the user can choose if and how the scenarios agents should be deleted with it.
Thanks to kreuzwerker.de who are paying me to work on this in the context of the research project 'Digitale Kuratierungstechnologien' of which they are a part of.