How to set store record manually as active?


#1

After adding new record to store I want to mark it as active(even store has only one record).

Ember.$.getJSON('/restURL').then(function (response) {
            if (response) {
                store.pushPayload('consultation', response);
               //how to set this new value as active. Like I in a /consultation/:id link
            }
        });

I tried to do it with transitionToRoute in the next way:

controller.transitionToRoute('consultation', response.consultation.id);

After calling transitionToRoute url hash is changed but data isn’t changed in template. But it works well with link-to handlebar’s helper.