8000 Code review changes · causecode/static-content@cc44982 · GitHub
[go: up one dir, main page]

Skip to content

Commit cc44982

Browse files
committed
Code review changes
1 parent 2ddbcae commit cc44982

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

grails-app/controllers/com/cc/content/blog/BlogController.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ class BlogController {
228228

229229
tagList = blogService.getAllTags()
230230
def blogInstanceTags = blogInstance.tags
231-
blogInstance.blogImgSrc = blogInstance?.blogImg?.path
232231

233232
// Convert markdown content into html format
234233
blogInstance.body = blogInstance.body?.markdownToHtml()

grails-app/domain/com/cc/content/blog/Blog.groovy

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,11 @@ import com.lucastex.grails.fileuploader.UFile
2020
*
2121
*/
2222
class Blog extends Content implements Taggable {
23-
// Used to hold UFile's path value
24-
static transients = ["blogImgSrc"]
25-
2623
UFile blogImg
27-
String blogImgSrc
2824

2925
static constraints = {
3026
blogImg nullable:true
3127
}
3228

3329
static final String UFILE_GROUP = "blogImg"
34-
3530
}

src/groovy/com/cc/marshaller/BlogDomainMarshaller.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class BlogDomainMarshaller implements ObjectMarshaller<JSON> {
2727
Blog blogInstance = object as Blog
2828
String author = blogInstance.resolveAuthor()
2929
JSONWriter writer = converter.getWriter()
30-
3130
writer.object()
3231

3332
writer.key("id")
@@ -43,7 +42,7 @@ class BlogDomainMarshaller implements ObjectMarshaller<JSON> {
4342
writer.key("publish")
4443
.value(blogInstance.publish)
4544
writer.key("blogImgSrc")
46-
.value(blogInstance.blogImgSrc)
45+
.value(blogInstance.blogImg?.path)
4746
writer.key("dateCreated")
4847
converter.convertAnother(blogInstance.dateCreated)
4948
writer.key("lastUpdated")

0 commit comments

Comments
 (0)
0