Skip to content

Commit

Permalink
URLs to missing API docs added emberjs#2177
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfernau committed Jan 22, 2018
1 parent af16990 commit de424c1
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion source/configuring-ember/disabling-prototype-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ fullNameDidChange: observer('fullName', function() {
})
```

Evented functions are annotated using `Ember.on()`:
Evented functions are annotated using [`Ember.on()`](https://emberjs.com/api/ember/2.15/namespaces/Ember/methods/on?anchor=on):

```javascript
import { on } from "@ember/object/evented"
Expand Down
2 changes: 1 addition & 1 deletion source/configuring-ember/handling-deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Fortunately, Ember provides a way for projects to deal with deprecations in an o
## Filtering Deprecations

When your project has a lot of deprecations, you can start by filtering out deprecations that do not have to be addressed right away. You
can use the [deprecation handlers](http://emberjs.com/api/classes/Ember.Debug.html#method_registerDeprecationHandler) API to check for what
can use the [deprecation handlers](https://emberjs.com/api/ember/2.15/classes/Ember.Debug/methods/registerDeprecationHandler?anchor=registerDeprecationHandler) API to check for what
release a deprecated feature will be removed. An example handler is shown below that filters out all deprecations that are not going away
in release 2.0.0.

Expand Down
2 changes: 1 addition & 1 deletion source/models/creating-updating-and-deleting-records.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ this.get('store').findRecord('person', 1).then(function(tyrion) {

All of the Ember.js conveniences are available for
modifying attributes. For example, you can use `Ember.Object`'s
[`incrementProperty`](http://emberjs.com/api/classes/Ember.Object.html#method_incrementProperty) helper:
[`incrementProperty`](https://emberjs.com/api/ember/2.15/classes/Ember.Object/methods/incrementProperty?anchor=incrementProperty) helper:

```js
person.incrementProperty('age'); // Happy birthday!
Expand Down
2 changes: 1 addition & 1 deletion source/models/finding-records.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let blogPosts = this.get('store').peekAll('blog-post'); // => no network request

`store.findAll()` returns a `DS.PromiseArray` that fulfills to a `DS.RecordArray` and `store.peekAll` directly returns a `DS.RecordArray`.

It's important to note that `DS.RecordArray` is not a JavaScript array, it's an object that implements [`Ember.Enumerable`](http://emberjs.com/api/classes/Ember.Enumerable.html).
It's important to note that `DS.RecordArray` is not a JavaScript array, it's an object that implements [`Ember.Enumerable`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable).
This is important because, for example, if you want to retrieve records by index,
the `[]` notation will not work--you'll have to use `objectAt(index)` instead.

Expand Down
24 changes: 12 additions & 12 deletions source/object-model/enumerables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
In Ember.js, an enumerable is any object that contains a number of child
objects, and which allows you to work with those children using the
[Ember.Enumerable](http://emberjs.com/api/classes/Ember.Enumerable.html) API. The most common
[Ember.Enumerable](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable) API. The most common
enumerable in the majority of apps is the native JavaScript array, which
Ember.js extends to conform to the enumerable interface.

Expand Down Expand Up @@ -46,11 +46,11 @@ in an observable fashion, you should use `myArray.get('firstObject')` and

In the rest of this guide, we'll explore some of the most common enumerable
conveniences. For the full list, please see the [Ember.Enumerable API
reference documentation.](http://emberjs.com/api/classes/Ember.Enumerable.html)
reference documentation.](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable)

### Iterating Over an Enumerable

To enumerate all the values of an enumerable object, use the [`forEach()`](http://emberjs.com/api/classes/Ember.Enumerable.html#method_forEach)
To enumerate all the values of an enumerable object, use the [`forEach()`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/methods/forEach?anchor=forEach)
method:


Expand All @@ -68,7 +68,7 @@ food.forEach((item, index) => {

### First and Last Objects

All enumerables expose [`firstObject`](http://emberjs.com/api/classes/Ember.Enumerable.html#property_firstObject) and [`lastObject`](http://emberjs.com/api/classes/Ember.Enumerable.html#property_lastObject) properties
All enumerables expose [`firstObject`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/properties/firstObject?anchor=firstObject) and [`lastObject`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/properties/lastObject?anchor=lastObject) properties
that you can bind to.


Expand All @@ -88,7 +88,7 @@ animals.get('lastObject');
### Map

You can easily transform each item in an enumerable using the
[`map()`](http://emberjs.com/api/classes/Ember.Enumerable.html#method_map) method, which creates a new array with results of calling a
[`map()`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/methods/map?anchor=map) method, which creates a new array with results of calling a
function on each item in the enumerable.


Expand All @@ -99,7 +99,7 @@ let emphaticWords = words.map(item => `${item}!`);
//=> ["goodbye!", "cruel!", "world!"]
```

If your enumerable is composed of objects, there is a [`mapBy()`](http://emberjs.com/api/classes/Ember.Enumerable.html#method_mapBy)
If your enumerable is composed of objects, there is a [`mapBy()`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/methods/mapBy?anchor=mapBy)
method that will extract the named property from each of those objects
in turn and return a new array:

Expand Down Expand Up @@ -127,7 +127,7 @@ Another common task to perform on an enumerable is to take the
enumerable as input, and return an Array after filtering it based on
some criteria.

For arbitrary filtering, use the [`filter()`](http://emberjs.com/api/classes/Ember.Enumerable.html#method_filter) method. The filter method
For arbitrary filtering, use the [`filter()`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/methods/filter?anchor=filter) method. The filter method
expects the callback to return `true` if Ember should include it in the
final Array, and `false` or `undefined` if Ember should not.

Expand All @@ -140,7 +140,7 @@ arr.filter((item, index, self) => item < 4);
//=> [1, 2, 3]
```

When working with a collection of Ember objects, you will often want to filter a set of objects based upon the value of some property. The [`filterBy()`](http://emberjs.com/api/classes/Ember.Enumerable.html#method_filterBy) method provides a shortcut.
When working with a collection of Ember objects, you will often want to filter a set of objects based upon the value of some property. The [`filterBy()`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/methods/filterBy?anchor=filterBy) method provides a shortcut.


```javascript
Expand All @@ -162,14 +162,14 @@ todos.filterBy('isDone', true);
```

If you only want to return the first matched value, rather than an Array
containing all of the matched values, you can use [`find()`](http://emberjs.com/api/classes/Ember.Enumerable.html#method_find) and [`findBy()`](http://emberjs.com/api/classes/Ember.Enumerable.html#method_findBy),
containing all of the matched values, you can use [`find()`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/methods/find?anchor=find) and [`findBy()`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/methods/findBy?anchor=findBy),
which work like `filter()` and `filterBy()`, but return only one item.


### Aggregate Information (Every or Any)

To find out whether every item in an enumerable matches some condition, you can
use the [`every()`](http://emberjs.com/api/classes/Ember.Enumerable.html#method_every) method:
use the [`every()`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/methods/every?anchor=every) method:


```javascript
Expand All @@ -191,7 +191,7 @@ people.every((person, index, self) => person.get('isHappy'));
```

To find out whether at least one item in an enumerable matches some condition,
you can use the [`any()`](http://emberjs.com/api/classes/Ember.Enumerable.html#method_any) method:
you can use the [`any()`](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable/methods/any?anchor=any) method:


```javascript
Expand All @@ -200,7 +200,7 @@ people.any((person, index, self) => person.get('isHappy'));
//=> true
```

Like the filtering methods, the `every()` and `any()` methods have
Like the filtering methods, the `every()` and `any()` methods have
analogous `isEvery()` and `isAny()` methods.

```javascript
Expand Down
2 changes: 1 addition & 1 deletion source/object-model/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ JavaScript classes or common patterns, but all are aligned as much as possible
with the language and proposed additions.

Ember also extends the JavaScript `Array` prototype with its
[Ember.Enumerable](http://emberjs.com/api/classes/Ember.Enumerable.html) interface to provide change observation for arrays.
[Ember.Enumerable](https://emberjs.com/api/ember/2.15/classes/Ember.Enumerable) interface to provide change observation for arrays.

Finally, Ember extends the `String` prototype with a few [formatting and
localization methods](https://www.emberjs.com/api/ember/release/classes/String).
2 changes: 1 addition & 1 deletion source/object-model/observers.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Observers never fire until after the initialization of an object is complete.

If you need an observer to fire as part of the initialization process, you
cannot rely on the side effect of `set`. Instead, specify that the observer
should also run after `init` by using [`Ember.on()`](http://emberjs.com/api/classes/Ember.html#method_on):
should also run after `init` by using [`Ember.on()`](https://emberjs.com/api/ember/2.15/namespaces/Ember/methods/on?anchor=on):


```javascript
Expand Down
6 changes: 3 additions & 3 deletions source/object-model/reopening-classes-and-instances.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
You don't need to define a class all at once. You can reopen a class and
define new properties using the
[`reopen()`](http://emberjs.com/api/classes/Ember.Object.html#method_reopen)
[`reopen()`](https://emberjs.com/api/ember/2.15/classes/Ember.Object/methods/reopen?anchor=reopen)
method.

```javascript
Expand All @@ -24,12 +24,12 @@ Person.reopen({
});
```

`reopen()` is used to add instance methods and properties that are shared
`reopen()` is used to add instance methods and properties that are shared
across all instances of a class. It does not add
methods and properties to a particular instance of a class as in vanilla JavaScript (without using prototype).

But when you need to add static methods or static properties to the class itself
you can use [`reopenClass()`](http://emberjs.com/api/classes/Ember.Object.html#method_reopenClass).
you can use [`reopenClass()`](https://emberjs.com/api/ember/2.15/classes/Ember.Object/methods/reopenClass?anchor=reopenClass).

```javascript
// add static property to class
Expand Down
4 changes: 2 additions & 2 deletions source/templates/writing-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You can also have Ember generate the file for you from the command line:
ember generate helper format-currency
```

That file should export a function wrapped with [`Ember.Helper.helper()`](http://emberjs.com/api/classes/Ember.Helper.html#method_helper):
That file should export a function wrapped with [`Ember.Helper.helper()`](https://emberjs.com/api/ember/2.15/classes/Ember.Helper/methods/helper?anchor=helper):

```app/helpers/format-currency.js
import { helper } from "@ember/component/helper"
Expand Down Expand Up @@ -396,5 +396,5 @@ type="javascript"&gt;alert('pwned!');&lt;/script&gt;</b> has joined the channel.
```
[1]: https://www.emberjs.com/api/ember/release/classes/Helper
[2]: https://www.emberjs.com/api/ember/release/classes/Helper/methods/compute?anchor=compute
[3]: http://emberjs.com/api/classes/Ember.Helper.html#method_helper
[3]: https://emberjs.com/api/ember/2.15/classes/Ember.Helper/methods/helper?anchor=helper
[4]: https://www.emberjs.com/api/ember/release/classes/@ember%2Fstring/methods/htmlSafe?anchor=htmlSafe
22 changes: 11 additions & 11 deletions source/testing/acceptance.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ In the `andThen` helper, we finally make our call to `assert.equal` which makes
assertion that the text found in the first li of the ul whose class is "posts"
is equal to "My new post".

[1]: http://emberjs.com/api/classes/Ember.Test.html#method_click
[2]: http://emberjs.com/api/classes/Ember.Test.html#method_fillIn
[3]: http://emberjs.com/api/classes/Ember.Test.html#method_keyEvent
[4]: http://emberjs.com/api/classes/Ember.Test.html#method_triggerEvent
[5]: http://emberjs.com/api/classes/Ember.Test.html#method_visit
[6]: http://emberjs.com/api/classes/Ember.Test.html#method_currentPath
[7]: http://emberjs.com/api/classes/Ember.Test.html#method_currentRouteName
[8]: http://emberjs.com/api/classes/Ember.Test.html#method_currentURL
[9]: http://emberjs.com/api/classes/Ember.Test.html#method_find
[1]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/click?anchor=click
[2]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/fillIn?anchor=fillIn
[3]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/keyEvent?anchor=keyEvent
[4]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/triggerEvent?anchor=triggerEvent
[5]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/visit?anchor=visit
[6]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/currentPath?anchor=currentPath
[7]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/currentRouteName?anchor=currentRouteName
[8]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/currentURL?anchor=currentURL
[9]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/find?anchor=find

### Custom Test Helpers

Expand All @@ -178,8 +178,8 @@ called. The difference between `Ember.Test.registerHelper` and
previous async helper has completed and any subsequent async helper will wait
for it to finish before running.

[10]: http://emberjs.com/api/classes/Ember.Test.html#method_registerAsyncHelper
[11]: http://emberjs.com/api/classes/Ember.Test.html#method_registerHelper
[10]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/registerAsyncHelper?anchor=registerAsyncHelper
[11]: https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/registerHelper?anchor=registerHelper

The helper method will always be called with the current Application as the
first parameter. Other parameters, such as assert, need to be provided when calling the helper. Helpers need to be registered prior to calling
Expand Down
4 changes: 2 additions & 2 deletions source/tutorial/autocomplete-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,8 @@ test('should filter the list of rentals by city.', function (assert) {

We introduce two new helpers into this test, `fillIn` and `keyEvent`.

* The [`fillIn`](http://emberjs.com/api/classes/Ember.Test.html#method_fillIn) helper "fills in" the given text into an input field matching the given selector.
* The [`keyEvent`](http://emberjs.com/api/classes/Ember.Test.html#method_keyEvent) helper sends a key stroke event to the UI, simulating the user typing a key.
* The [`fillIn`](https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/fillIn?anchor=fillIn) helper "fills in" the given text into an input field matching the given selector.
* The [`keyEvent`](https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/keyEvent?anchor=keyEvent) helper sends a key stroke event to the UI, simulating the user typing a key.

In `app/components/list-filter.js`, we have as the top-level element rendered by the component a class called `list-filter`.
We locate the search input within the component using the selector `.list-filter input`,
Expand Down
2 changes: 1 addition & 1 deletion source/tutorial/model-hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ To check that rentals are listed with an automated test, we will create a test t
In `app/templates/rentals.hbs`, we wrapped each rental display in an `article` element, and gave it a class called `listing`.
We will use the listing class to find out how many rentals are shown on the page.

To find the elements that have a class called `listing`, we'll use a test helper called [find](http://emberjs.com/api/classes/Ember.Test.html#method_find).
To find the elements that have a class called `listing`, we'll use a test helper called [find](https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/find?anchor=find).
The `find` function returns the elements that match the given [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors).
In this case it will return an array of all the elements with a class called `listing`.

Expand Down
6 changes: 3 additions & 3 deletions source/tutorial/routes-and-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,11 @@ such as visiting routes, filling in fields, clicking on links/buttons, and waiti

Some of the helpers we'll use commonly are:

* [`visit`](http://emberjs.com/api/classes/Ember.Test.html#method_visit) - loads a given URL
* [`click`](http://emberjs.com/api/classes/Ember.Test.html#method_click) - pretends to be a user clicking on a specific part of the screen
* [`visit`](https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/visit?anchor=visit) - loads a given URL
* [`click`](https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/click?anchor=click) - pretends to be a user clicking on a specific part of the screen
* [`andThen`](../../testing/acceptance/#toc_wait-helpers) - waits for our previous commands to run before executing our function.
In our test below, we want to wait for our page to load after `click` is called so that we can double-check that the new page has loaded
* [`currentURL`](http://emberjs.com/api/classes/Ember.Test.html#method_currentURL) - returns the URL of the page we're currently on
* [`currentURL`](https://emberjs.com/api/ember/2.15/classes/Ember.Test/methods/currentURL?anchor=currentURL) - returns the URL of the page we're currently on

### Test visiting our About and Contact pages
Now let's add code that simulates a visitor arriving on our homepage, clicking one of our links and then visiting a new page.
Expand Down

0 comments on commit de424c1

Please sign in to comment.