File tree Expand file tree Collapse file tree 3 files changed +1
-8
lines changed
controllers/com/cc/content/blog
domain/com/cc/content/blog
src/groovy/com/cc/marshaller Expand file tree Collapse file tree 3 files changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,6 @@ class BlogController {
228
228
229
229
tagList = blogService. getAllTags()
230
230
def blogInstanceTags = blogInstance. tags
231
- blogInstance. blogImgSrc = blogInstance?. blogImg?. path
232
231
233
232
// Convert markdown content into html format
234
233
blogInstance. body = blogInstance. body?. markdownToHtml()
Original file line number Diff line number Diff line change @@ -20,16 +20,11 @@ import com.lucastex.grails.fileuploader.UFile
20
20
*
21
21
*/
22
22
class Blog extends Content implements Taggable {
23
- // Used to hold UFile's path value
24
- static transients = [" blogImgSrc" ]
25
-
26
23
UFile blogImg
27
- String blogImgSrc
28
24
29
25
static constraints = {
30
26
blogImg nullable :true
31
27
}
32
28
33
29
static final String UFILE_GROUP = " blogImg"
34
-
35
30
}
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ class BlogDomainMarshaller implements ObjectMarshaller<JSON> {
27
27
Blog blogInstance = object as Blog
28
28
String author = blogInstance. resolveAuthor()
29
29
JSONWriter writer = converter. getWriter()
30
-
31
30
writer. object()
32
31
33
32
writer. key(" id" )
@@ -43,7 +42,7 @@ class BlogDomainMarshaller implements ObjectMarshaller<JSON> {
43
42
writer. key(" publish" )
44
43
.value(blogInstance. publish)
45
44
writer. key(" blogImgSrc" )
46
- .value(blogInstance. blogImgSrc )
45
+ .value(blogInstance. blogImg ?. path )
47
46
writer. key(" dateCreated" )
48
47
converter. convertAnother(blogInstance. dateCreated)
49
48
writer. key(" lastUpdated" )
You can’t perform that action at this time.
0 commit comments