Class: Ilog::Controllers::Asset::Display

Inherits:
Object
  • Object
show all
Includes:
Action, Helpers
Defined in:
lib/ilog/controllers/asset/display.rb

Instance Method Summary collapse

Methods included from Helpers

#get_database, #get_namespace, #set_database

Instance Method Details

#call(params) ⇒ Object



9
10
11
12
13
14
15
16
17
# 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