Sha256: 237e33a3b635e72383cc68964d1a6ccc2074d59d479b5bdfc91b77e3fb742417
Contents?: true
Size: 527 Bytes
Versions: 2
Compression:
Stored size: 527 Bytes
Contents
module Brief::Model::Serializers def as_json { data: data, path: path.to_s, type: type, actions: self.class.defined_actions, urls: { view_content_url: "/view/content/#{ path }", view_rendered_url: "/view/rendered/#{ path }", view_details_url: "/view/details/#{ path }", update_url: "/update/#{ path }", remove_url: "/remove/#{ path }", schema_url: "/schema/#{ type }", actions_url: "/actions/:action/#{ path }" } } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
brief-1.4.2 | lib/brief/model/serializers.rb |
brief-1.4.1 | lib/brief/model/serializers.rb |