import Ember from 'ember';

// LAME, but ¯\_(ツ)_/¯
export default function hasEmberVersion(major, minor) {
  var numbers = Ember.VERSION.split('-')[0].split('.');
  var actualMajor = parseInt(numbers[0], 10);
  var actualMinor = parseInt(numbers[1], 10);
  return actualMajor > major || (actualMajor === major && actualMinor >= minor);
}

export const attributeMungingMethod = (function() {
  if (hasEmberVersion(2, 9)) {
    return 'didReceiveAttrs';
  } else {
    return `willRender`;
  }
})();

@@ -413,9 +413,10 @@
 (2, 
-9
+10
 )) %7B

Use correct link-to method for 2.9.0.