import Ember from 'ember'
export default Ember.Route.extend
  model: (options) ->
    @store.findRecord('panda/project-instance', options.project_instance_id)
  afterModel: (model, transition) ->
    model.reload() if @controllerFor('application').get('currentRouteName') in ['action-list', 'project.show.project-instance.index']
  setupController: (controller, model) ->
    controller.set 'project', @modelFor('project.show')
    @_super arguments...
