app/views/ishapi/reports/show.jbuilder in ishapi-0.1.8.29 vs app/views/ishapi/reports/show.jbuilder in ishapi-0.1.8.30
- old
+ new
@@ -7,11 +7,13 @@
json.cache! key do
json.report do
json.id @report.id.to_s
json.name @report.name
json.reportname @report.name_seo
- json.photo_url @report.photo.photo.url( :small ) if @report.photo
- json.thumb_url @report.photo.photo.url( :thumb )
+ if @report.photo
+ json.photo_url @report.photo.photo.url( :small )
+ json.thumb_url @report.photo.photo.url( :thumb )
+ end
# @TODO: move this to meta
json.created_at @report.created_at.strftime('%Y%m%d')
json.updated_at @report.updated_at.strftime('%Y%m%d')
json.username @report.username