class Ilog::Controllers::Asset::Display

Public Instance Methods

call(params) click to toggle source
# File lib/ilog/controllers/asset/display.rb, line 9
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