Sha256: 04850ce0482cde0fd73a6a5392b414ef624be1599d1b76666298d9c31b9f5177

Contents?: true

Size: 651 Bytes

Versions: 4

Compression:

Stored size: 651 Bytes

Contents

require ('ilog/controllers/helpers')

module Ilog
  module Controllers
    module Digital
      class Show
        include Ilog::Action
        include Helpers
        def call(params)
	        set_database params[:domain]
	        req = request.env['HTTP_ACCEPT']
			if req.include? 'application/json'
		   		post = ::Post.find(params[:id])
		   		Post.namespace = get_namespace params[:domain]
		   		self.format = :json
		   		self.body = post.to_json(:include => ::Post::DIMENSIONS + ::Post::GROUPINGS, :methods => [:content])
		   	else
		   		index = Index::Digital.new
		   		index.call params
		   	end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ilog-0.4.3 lib/ilog/controllers/digital/show.rb
ilog-0.4.2 lib/ilog/controllers/digital/show.rb
ilog-0.4.1 lib/ilog/controllers/digital/show.rb
ilog-0.4.0 lib/ilog/controllers/digital/show.rb