Ruby In Steel :: Help Index :: SapphireSteel Software Front Page Return to the Index
Ruby On Rails IntelliSense
See Also

Glossary Item Box

Providing IntelliSense for Ruby files in a Rails application poses a special challenge due to the fact that the relationships between Ruby On Rails code files are not specified by 'requiring' other files in the code itself. Related code files are only 'wired together' when the Rails system processes them after the application is deployed. This explains why the Ruby interpreter itself is unable to run Ruby On Rails code files in the normal way.

Ruby In Steel Developer addresses this problem by attempting to work out the implicit relationships between Ruby On Rails code files at design time so that the IntelliSense system can then gain access to the appropriate methods to display in code completion lists. For example, if a controller (say, blog_controller.rb), requires classes defined in one of the files in the \models directory (say, the Post class in a file named post.rb), the model files will be automatically required by the controller and parsed for IntelliSense by Ruby In Steel.

Rails IntelliSense

If you need access to files which are not automatically required in this way, you can also specify additional files to be required and parsed for IntelliSense. Do this by selecting the file for which you need IntelliSense in the Solution Explorer; then add the full paths to the required files in the Require Files property of the Properties panel. Each file path must be separated by a semicolon. A quick way of obtaining the path to a file is to open that file in Visual Studio, click its editor tab and select Copy Full Path. This path can then be pasted into the Require Files property field.

Note: In order for Ruby On Rails files to have access to IntelliSense, you must ensure that the Rails Project property is set to true (in the Project Properties dialog). This property is set to true by default when you create, import or convert a Rails project. If you change the value of the Rails Project property you should close and reopen any files open in the editor in order to reinitialize their IntelliSense.

See Also