Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update readme with info about related files

  • Loading branch information...
commit 94ef535a8efbdc63ce04b3b31c91a93eed984a59 1 parent acc36fd
Anders Nøklestad authored

Showing 1 changed file with 61 additions and 7 deletions. Show diff stats Hide diff stats

  1. +61 7 README.md
68 README.md
Source Rendered
@@ -11,15 +11,69 @@ simply by pressing Enter. For instance, if the active view is a Rails model
11 11 and you request a list of controllers, the controller corresponding to the
12 12 model will be listed at the top, provided that you follow normal Rails
13 13 resource conventions with the controller name containing the pluralized
14   -version of the model name (e.g. post.rb and posts_controller.rb).
  14 +version of the model name (e.g. `post.rb` and `posts_controller.rb`).
15 15
16 16 The same goes for tests or specs (in the example case, the test file should be
17   -called test/unit/post_test.rb or spec/models/post_spec.rb). If the application
18   -contains a `spec` directory, the plugin will search for specs and ignore the
19   -`test` directory; otherwise the `test` directory will be used.
20   -
21   -The plugin was inspired by Luqman Amjad's Rails Related Files plugin. These
22   -plugins have complementary functionality and can be used together.
  17 +called `test/unit/post_test.rb` or `spec/models/post_spec.rb`). If the
  18 +application contains a `spec` directory, the plugin will search for specs and
  19 +ignore the `test` directory; otherwise the `test` directory will be used.
  20 +
  21 +The following table shows which related files will be put at the top of the list:
  22 +
  23 +<table>
  24 + <thead>
  25 + <tr>
  26 + <td>Active file</td>
  27 + <td>Listing these file types will show related files at the top of the list</td>
  28 + </tr>
  29 + </thead>
  30 + <tbody>
  31 + <tr>
  32 + <td>model</td>
  33 + <td>controller; fixture; model unit test/model spec</td>
  34 + </tr>
  35 + <tr>
  36 + <td>controller</td>
  37 + <td>model; views; helper; functional test/controller spec</td>
  38 + </tr>
  39 + <tr>
  40 + <td>view</td>
  41 + <td>controller; functional test/view spec</td>
  42 + </tr>
  43 + <tr>
  44 + <td>helper</td>
  45 + <td>controller; helper unit test/helper spec</td>
  46 + </tr>
  47 + <tr>
  48 + <td>fixture</td>
  49 + <td>model; model unit test/model spec; functional test/controller spec</td>
  50 + </tr>
  51 + <tr>
  52 + <td>model unit test/model spec</td>
  53 + <td>model; fixture</td>
  54 + </tr>
  55 + <tr>
  56 + <td>functional test</td>
  57 + <td>controller; views; fixture</td>
  58 + </tr>
  59 + <tr>
  60 + <td>controller spec</td>
  61 + <td>controller; fixture</td>
  62 + </tr>
  63 + <tr>
  64 + <td>view spec</td>
  65 + <td>view</td>
  66 + </tr>
  67 + <tr>
  68 + <td>helper unit test/helper spec</td>
  69 + <td>helper</td>
  70 + </tr>
  71 + </tbody>
  72 +</table>
  73 +
  74 +This plugin was inspired by Luqman Amjad's Rails Related Files plugin. The
  75 +plugins have complementary functionality (Amjad's plugin shows related files
  76 +of all types in a single list), and they can be used together.
23 77
24 78 ## Installation
25 79

0 comments on commit 94ef535

Please sign in to comment.
Something went wrong with that request. Please try again.