OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add: license publisher
[pettanr/pettanr.git]
/
app
/
assets
/
javascripts
/
models
/
story.js.coffee
diff --git
a/app/assets/javascripts/models/story.js.coffee
b/app/assets/javascripts/models/story.js.coffee
index
6d5482f
..
dc17136
100644
(file)
--- a/
app/assets/javascripts/models/story.js.coffee
+++ b/
app/assets/javascripts/models/story.js.coffee
@@
-14,14
+14,14
@@
class Pettanr.Story extends Peta.Binder
}
\r
\r
author: () ->
\r
}
\r
\r
author: () ->
\r
- new Pettanr.
Author({id: @get('author_id')}
)
\r
+ new Pettanr.
Cache.Retriever(Pettanr.Author, @get('author_id')
)
\r
\r
overwrite: (options) ->
\r
\r
overwrite: (options) ->
\r
- operators =
options
.operators
\r
+ operators =
Pettanr.cache
.operators
\r
return false if not operators.author
\r
@set('author_id', operators.author.id)
\r
\r
return false if not operators.author
\r
@set('author_id', operators.author.id)
\r
\r
- is_visible: (operators) ->
\r
+ is_visible: (operators
= Pettanr.cache.operators
) ->
\r
switch super(operators)
\r
when null
\r
return true
\r
switch super(operators)
\r
when null
\r
return true
\r
@@
-30,7
+30,8
@@
class Pettanr.Story extends Peta.Binder
else
\r
@get('visible') > 0
\r
\r
else
\r
@get('visible') > 0
\r
\r
- initialize: () ->
\r
+ initialize: (attr = {}, options = {}) ->
\r
+ super(attr, options)
\r
if @id
\r
@url = @url + @id
\r
\r
if @id
\r
@url = @url + @id
\r
\r