-
-
Save luxerama/2038069 to your computer and use it in GitHub Desktop.
Batman Category Problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
edit: (params) -> | |
@set 'channel', Ems.Channel.find parseInt(params.id), (err) -> throw err if err | |
Ems.Category.load (err, categories) => | |
throw err if err | |
@set 'categories', categories | |
console.log 'Categories returned: ', categories | |
# RETURNS: | |
# | |
# > Categories returned: [ Category, Category, Category ] | |
@get("channel").get("categories").load (err, cats) => | |
throw err if err | |
console.log 'Categories length: ', cats.length | |
console.log 'Channel categories loaded: ', @get('channel.categories.loaded') | |
# RETURNS: | |
# | |
# > Categories length: 0 | |
# > Channel categories loaded: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment