Method: Dolt::ControllerActions#raw

Defined in:
lib/libdolt/controller_actions.rb

#raw(repo, ref, path, custom_data = {}) ⇒ Object



87
88
89
90
91
92
93
94
95
96
97
# File 'lib/libdolt/controller_actions.rb', line 87

def raw(repo, ref, path, custom_data = {})
  if oid = lookup_ref_oid(repo, ref)
    return redirect(router.raw_url(repo, oid, path), 307)
  end

  blob(repo, ref, path, custom_data, {
      :template => :raw,
      :content_type => "text/plain",
      :template_options => { :layout => nil }
    })
end