Sha256: 9b68fc102a91dc71a2cc97856a6f918a1268e7981557b677cefc21accd7b6975

Contents?: true

Size: 650 Bytes

Versions: 6

Compression:

Stored size: 650 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 = set_database 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

6 entries across 6 versions & 1 rubygems

Version Path
ilog-0.4.9 lib/ilog/controllers/digital/show.rb
ilog-0.4.8 lib/ilog/controllers/digital/show.rb
ilog-0.4.7 lib/ilog/controllers/digital/show.rb
ilog-0.4.6 lib/ilog/controllers/digital/show.rb
ilog-0.4.5 lib/ilog/controllers/digital/show.rb
ilog-0.4.4 lib/ilog/controllers/digital/show.rb