Issue: can.view.ejs(str) and can.view.ejs(id, str) return different responses #485

Merged
merged 1 commit into from Oct 14, 2013

Conversation

Projects
None yet
1 participant
@daffl
Contributor

daffl commented Oct 14, 2013

can.view.ejs(id, str) currently returns renderer function, while can.view.ejs(str) returns renderer function, wrapped with can.view.frag() call. This should be fixed in order to make return value consistent.

See more details at #483

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Sep 27, 2013

Contributor

This is not uncommon, see jQuery, where $().attr('attribute') returns the attribute value and $().attr('attribute', value) sets the value and returns the jQuery element.

The return value for can.view() and how to use it is also documented pretty extensively. In the future we might revisit how this works (see #64) and generally make sure return values are consistent but I don't consider this an issue at the moment.

Contributor

daffl commented Sep 27, 2013

This is not uncommon, see jQuery, where $().attr('attribute') returns the attribute value and $().attr('attribute', value) sets the value and returns the jQuery element.

The return value for can.view() and how to use it is also documented pretty extensively. In the future we might revisit how this works (see #64) and generally make sure return values are consistent but I don't consider this an issue at the moment.

@daffl daffl closed this Sep 27, 2013

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Sep 27, 2013

Contributor

Ah, sorry just saw the conversation in #483. Reopening this issue so we can revisit this.

Contributor

daffl commented Sep 27, 2013

Ah, sorry just saw the conversation in #483. Reopening this issue so we can revisit this.

@daffl daffl reopened this Sep 27, 2013

@ghost ghost assigned daffl Oct 14, 2013

daffl added a commit that referenced this pull request Oct 14, 2013

Merge pull request #485 from bitovi/renderer-consistency-485
Issue: can.view.ejs(str) and can.view.ejs(id, str) return different responses

@daffl daffl merged commit 55c06f2 into master Oct 14, 2013

1 check passed

default The Travis CI build passed
Details

@daffl daffl deleted the renderer-consistency-485 branch Oct 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment