-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Data attribute names should be dasherized
Signed-off-by: Akash Manohar J <[email protected]>
- Loading branch information
Showing
10 changed files
with
22 additions
and
31 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
app/assets/javascripts/backbone/collections/activities.js.coffee
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
class Kandan.Collections.Activities extends Backbone.Collection | ||
|
||
url: ()-> | ||
"channels/#{@channel_id}/activities" | ||
"channels/#{@channelId}/activities" | ||
|
||
initialize: (models, options)-> | ||
@channel_id = options.channel_id | ||
@channelId = options.channel_id | ||
|
||
parse: (response)-> | ||
@more_activities = response.more_activities | ||
@moreActivities = response.more_activities | ||
response.activities |
4 changes: 2 additions & 2 deletions
4
app/assets/javascripts/backbone/collections/attachments.js.coffee
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
class Kandan.Collections.Attachments extends Backbone.Collection | ||
url: ()-> | ||
"/channels/#{@channel_id}/attachments" | ||
"/channels/#{@channelId}/attachments" | ||
|
||
initialize: (models, options)-> | ||
@channel_id = options.channel_id | ||
@channelId = options.channelId |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
class Kandan.Models.Activity extends Backbone.Model | ||
url: ()-> | ||
"channels/#{@get('channel_id')}/activities" | ||
|
||
initialize: (options)-> | ||
@channel_id = @get('channel_id') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
class Kandan.Models.Channel extends Backbone.Model | ||
urlRoot: '/channels' | ||
|
||
# initialize: ()-> | ||
# console.log @activities | ||
|
||
parse: (response)-> | ||
@more_activities = false | ||
@moreActivities = false | ||
if response.activities | ||
activities = new Kandan.Collections.Activities([], {channel_id: response.id}) | ||
activities.add(response.activities) | ||
@activities = activities | ||
@more_activities = response.more_activities | ||
@moreActivities = response.more_activities | ||
response |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
class Kandan.Models.User extends Backbone.Model | ||
urlRoot: '/users' | ||
|
||
initialize: ()-> | ||
console.log "initialized user" |
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
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