From 1ea0dd0ffc37232d27f4fa1350af6ebb3b5439f2 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 25 Oct 2012 11:59:41 +0300 Subject: App docs --- doc/app/BlobController.html | 519 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 519 insertions(+) create mode 100644 doc/app/BlobController.html (limited to 'doc/app/BlobController.html') diff --git a/doc/app/BlobController.html b/doc/app/BlobController.html new file mode 100644 index 00000000000..e8f069c2f4a --- /dev/null +++ b/doc/app/BlobController.html @@ -0,0 +1,519 @@ + + + + + + +class BlobController - Rails Application Documentation + + + + + + + + + + + + + + + + +
+

class BlobController

+ +
+ +

Controller for viewing a file’s blame

+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ +
+ show() + click to toggle source +
+ + +
+ + + + + +
+
# File app/controllers/blob_controller.rb, line 13
+def show
+  if @tree.is_blob?
+    if @tree.text?
+      encoding = detect_encoding(@tree.data)
+      mime_type = encoding ? "text/plain; charset=#{encoding}" : "text/plain"
+    else
+      mime_type = @tree.mime_type
+    end
+
+    send_data(
+      @tree.data,
+      type: mime_type,
+      disposition: 'inline',
+      filename: @tree.name
+    )
+  else
+    not_found!
+  end
+end
+
+ +
+ + + + +
+ + +
+ +
+ +
+ + + + -- cgit v1.2.1