<commit_before>import Ember from 'ember';

export default Ember.Route.extend({
  model() {
    return this.store.createRecord('league');
  },

  actions: {
    save(league) {
      const flashMessages = Ember.get(this, 'flashMessages');

      let newLeague = this.store.createRecord('league', league);

      newLeague.save().then(() => {
        flashMessages.success('League has been created');

        this.transitionTo('league.teams', newLeague.id);
      }).catch(() => {
        flashMessages.danger('Unable to create league');
      });

    }
  }
});
<commit_msg>removed model hook<commit_after>import Ember from 'ember';

export default Ember.Route.extend({
  actions: {
    save(league) {
      const flashMessages = Ember.get(this, 'flashMessages');

      let newLeague = this.store.createRecord('league', league);

      newLeague.save().then(() => {
        flashMessages.success('League has been created');

        this.transitionTo('league.teams', newLeague.id);
      }).catch(() => {
        flashMessages.danger('Unable to create league');
      });

    }
  }
});

{'fraction_non_alphanumeric': 0.15823367065317387, 'fraction_numerical': 0.0, 'mean_word_length': 3.0446096654275094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2133849', 'n_tokens_mistral': 335, 'n_tokens_neox': 309, 'n_words': 63}