kadirahq / fast-render

Render you app even before the DDP connection is live. - magic?
MIT License
560 stars 80 forks source link

Patch 1 #31

Closed Tarang closed 10 years ago

Tarang commented 10 years ago

I hope this is okay:

Usage:

FastRender.route('/r/:slug', function(params, path, headers) {
  this.subscribe('article', params.slug, headers['Accept-Language']);
});
Tarang commented 10 years ago

Whoops.. not yet complete, forgot the tests

arunoda commented 10 years ago

BTW: I like this.headers instead passing the headers as an arg.


Arunoda Susiripala I curate Meteor Weekly - Check it out!http://meteorhacks.com/meteor-weekly/?utm_source=email-footer&utm_medium=email&utm_campaign=meteorweekly

On Sun, Mar 16, 2014 at 5:04 PM, Tarang Patel notifications@github.comwrote:

Whoops.. not yet complete, forgot the tests

— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/meteor-fast-render/pull/31#issuecomment-37754816 .

Tarang commented 10 years ago

Oh ok, I just did followed the convention with the other stuff. Let me change that.

arunoda commented 10 years ago

Nice.


Arunoda Susiripala

@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda

On Sun, Mar 16, 2014 at 5:08 PM, Tarang Patel notifications@github.comwrote:

Oh ok, I just did followed the convention with the other stuff. Let me change that.

— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/meteor-fast-render/pull/31#issuecomment-37754876 .

Tarang commented 10 years ago

Is this ok?

arunoda commented 10 years ago

And a test case to verify headers :)

Tarang commented 10 years ago

I hope this covers it

arunoda commented 10 years ago

yep. That's good :)

arunoda commented 10 years ago

merged and released.

Tarang commented 10 years ago

Cool Thanks.

One thing though. The code is fine but the tests are having a couple of issues with what I added in the tests because of this. (And a small typo). I'm trying to fix that. Is there a way to use this?

arunoda commented 10 years ago

I actually changed tests a bit. I never release without testing :)


Arunoda Susiripala

@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda

On Sun, Mar 16, 2014 at 6:08 PM, Tarang Patel notifications@github.comwrote:

Cool Thanks.

One thing though. The code is fine but the tests are having a couple of issues with what I added because of this. (And a small typo). I'm trying to fix that. Is there a way to use this?

— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/meteor-fast-render/pull/31#issuecomment-37756004 .