Sha256: 60765ae39ed19f61c39c202cf6f3f5b424a3a6a9f115eaa09afc7545bd6e1b12

Contents?: true

Size: 882 Bytes

Versions: 4

Compression:

Stored size: 882 Bytes

Contents

#
# ishapi / maps / _show
#

## @TODO: make sure that _show.jbuilder and show.jbuilder are reasonably deduped

this_key = [ map.id, map.updated_at, params.permit! ]
json.cache! this_key do
  json.map do
    json.id          map.id.to_s
    json.slug        map.slug
    json.parent_slug map.parent_slug
    json.description map.description
    json.w           map.w
    json.h           map.h
    json.img_path    map.image.image.url(:original)
    json.updated_at  map.updated_at

    json.partial! 'ishapi/markers/index', map: map

    ## I removed json parsing from here! _vp_ 2021-10-14
    ## I added json parsing here! _vo_ 2021-10-19
    if map.parent_slug.present?
      json.config JSON.parse @map.parent.config
      json.labels JSON.parse @map.parent.labels
    else
      json.config JSON.parse @map.config
      json.labels JSON.parse @map.labels
    end

  end
end


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ishapi-0.1.8.162 app/views/ishapi/maps/_show.jbuilder
ishapi-0.1.8.161 app/views/ishapi/maps/_show.jbuilder
ishapi-0.1.8.160 app/views/ishapi/maps/_show.jbuilder
ishapi-0.1.8.159 app/views/ishapi/maps/_show.jbuilder