Skip to content

Commit

Permalink
Small readme tweak + added assert.
Browse files Browse the repository at this point in the history
  • Loading branch information
ghempton committed Feb 22, 2012
1 parent 678e1b5 commit 6ed4df1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Provides an intuitive layout mechanism for [Ember.js](http://emberjs.com). The c

### How It Works

The `{{dynamicView}}` binds itself to the `content` property of its containg view. When the content property is set to a subclass of `Ember.View`, the dynamic view helper's contents will be replaced with the specified view. To use a different property, simply specify it as follows: `{{dynamicView propertyName}}`.
The `{{dynamicView}}` binds itself to the `content` property of its containg view. When the content property is set to a subclass of `Ember.View`, the dynamic view helper's contents will be replaced to reflect the new view. This property can be changed at any time. To use a different property, simply specify it as follows: `{{dynamicView propertyName}}`.

### Example Layout

Expand Down
1 change: 1 addition & 0 deletions packages/ember-layout/lib/helpers/dynamic_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Ember.Handlebars.FrameView = Ember.ContainerView.extend({
contentDidUpdate: function() {
var blockContainer = this.get('blockContainer');
var view = blockContainer.getPath(get(this, 'childPath'));
ember_assert(view instanceof Ember.View, "dynamicView's content must be set to a subclass of Ember.View'");
var childViews = this.get('_childViews');
var len = childViews.get('length');
var views = view ? [view] : [];
Expand Down

0 comments on commit 6ed4df1

Please sign in to comment.