Sha256: 1e754ca036cb5d306858cbbd60d124037bd5b7d0ade8b87c542745f027252e87

Contents?: true

Size: 549 Bytes

Versions: 11

Compression:

Stored size: 549 Bytes

Contents

import RelatedWorks from 'geo_concerns/relationships/related_works';

/**
* Provides functionality to add and remove child works.
*/
export default class ChildWorks extends RelatedWorks {
  /**
  * Builds form data string for ordered_member_ids.
  * @param {Array} array of ordered member ids
  */
  buildFormData(ids) {
    let data;
    if (ids.length === 0) {
      data = `${this.paramKey}[ordered_member_ids][]=`;
    } else {
      data = ids.map((id) => `${this.paramKey}[ordered_member_ids][]=${id}`).join('&');
    }
    return data;
  }
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
geo_concerns-0.3.4 app/assets/javascripts/geo_concerns/relationships/child_works.es6
geo_concerns-0.3.3 app/assets/javascripts/geo_concerns/relationships/child_works.es6
geo_concerns-0.3.2 app/assets/javascripts/geo_concerns/relationships/child_works.es6
geo_concerns-0.3.1 app/assets/javascripts/geo_concerns/relationships/child_works.es6
geo_concerns-0.3.0 app/assets/javascripts/geo_concerns/relationships/child_works.es6
geo_concerns-0.2.0 app/assets/javascripts/geo_concerns/relationships/child_works.es6
geo_concerns-0.1.1 app/assets/javascripts/geo_concerns/relationships/child_works.es6
geo_concerns-0.1.0 app/assets/javascripts/geo_concerns/relationships/child_works.es6
geo_concerns-0.0.10 app/assets/javascripts/geo_concerns/relationships/child_works.es6
geo_concerns-0.0.9 app/assets/javascripts/geo_concerns/relationships/child_works.es6
geo_concerns-0.0.8 app/assets/javascripts/geo_concerns/relationships/child_works.es6