import Component from '@ember/component';
import { action, computed } from '@ember/object';

export default class OwnedCrateRow extends Component {
  tagName = '';

  @computed('ownedCrate.id')
  get controlId() {
    return `${this.ownedCrate.id}-email-notifications`;
  }

  @action setEmailNotifications(event) {
    let { checked } = event.target;
    this.ownedCrate.set('email_notifications', checked);
  }
}

import Component from '@ember/component';
import { action } from '@ember/object';
import { guidFor } from '@ember/object/internals';

export default class OwnedCrateRow extends Component {
  tagName = '';

  controlId = `${guidFor(this)}-checkbox`;

  @action setEmailNotifications(event) {
    let { checked } = event.target;
    this.ownedCrate.set('email_notifications', checked);
  }
}

Use `guidFor()` to generate `controlId`
OwnedCrateRow: Use `guidFor()` to generate `controlId`
