Sha256: ea2b671b2f4d7a234914d3368aed263dfeed5f4fc72009d144bfa33e113c8ff8
Contents?: true
Size: 832 Bytes
Versions: 1
Compression:
Stored size: 832 Bytes
Contents
require ('ilog/controllers/helpers') module Ilog module Controllers module Index class Digital include Ilog::Action include Helpers expose :namespace, :vue_config def call(params) set_database params[:domain] # variable set for front-end vue @vue_config = Ilog.configuration # rest of action @namespace = get_namespace params[:domain] req = request.env['HTTP_ACCEPT'] if req.include? 'application/json' post = ::Post.find(params[:id]) post.namespace = get_database params[:domain] self.format = :json self.body = post.to_json(:include => ::Post::DIMENSIONS + ::Post::GROUPINGS, :methods => [:content].force_encoding(Encoding::UTF_8)) end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ilog-0.4.8 | lib/ilog/controllers/index/digital.rb |