Sha256: 5b0bb3e426e77c66c1396c31736b790bbb7a780976458b132ab17db03a0b322b
Contents?: true
Size: 691 Bytes
Versions: 6
Compression:
Stored size: 691 Bytes
Contents
require 'mime/types/full' module Ilog module Controllers module Asset class Display include Ilog::Action include Ilog::Controllers::Helpers def call(params) set_database params[:domain] post = ::Post.find(params[:id]) post.namespace = get_database params[:domain] file = post.get_asset(params) puts file.to_s self.headers.merge!({ 'Content-Type' => MIME::Types.type_for(file.path).first.content_type }) self.body = file end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems