2015-12-02 14:23:39 +00:00
|
|
|
#+TITLE: Ruby on Rails layer
|
2015-07-04 03:33:13 +00:00
|
|
|
|
|
|
|
[[file:img/ror.png]]
|
|
|
|
|
2016-03-31 02:59:55 +00:00
|
|
|
* Table of Contents :TOC_4_gh:noexport:
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#description][Description]]
|
2017-08-31 16:25:47 +00:00
|
|
|
- [[#features][Features:]]
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#install][Install]]
|
|
|
|
- [[#key-bindings][Key bindings]]
|
|
|
|
- [[#code-navigation][Code Navigation]]
|
|
|
|
- [[#refactoring][Refactoring]]
|
|
|
|
- [[#run-commands][RUN commands]]
|
|
|
|
- [[#ex-commands][Ex-commands]]
|
2015-07-04 03:33:13 +00:00
|
|
|
|
|
|
|
* Description
|
|
|
|
This layer aims at providing support for the Ruby on Rails framework.
|
|
|
|
|
2017-08-31 16:25:47 +00:00
|
|
|
** Features:
|
|
|
|
- Quick file navigation with with [[https://github.com/asok/projectile-rails][projectile-rails]]
|
|
|
|
- Run server
|
|
|
|
- Run generators
|
|
|
|
- Rake runner
|
|
|
|
- Interactive Rails console
|
|
|
|
|
2015-07-04 03:33:13 +00:00
|
|
|
* Install
|
2016-01-06 05:21:55 +00:00
|
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
|
|
add =ruby-on-rails= to the existing =dotspacemacs-configuration-layers= list in this
|
|
|
|
file.
|
2015-07-04 03:33:13 +00:00
|
|
|
|
|
|
|
* Key bindings
|
|
|
|
** Code Navigation
|
|
|
|
|
|
|
|
| Key binding | Description |
|
|
|
|
|---------------+-----------------------------------------------------------------|
|
|
|
|
| ~SPC m r f a~ | find localization file |
|
|
|
|
| ~SPC m r f c~ | find controller |
|
|
|
|
| ~SPC m r f e~ | find environment file |
|
|
|
|
| ~SPC m r f f~ | find feature |
|
|
|
|
| ~SPC m r f h~ | find helper |
|
|
|
|
| ~SPC m r f i~ | find initializer |
|
|
|
|
| ~SPC m r f j~ | find javascript file |
|
|
|
|
| ~SPC m r f l~ | find library |
|
|
|
|
| ~SPC m r f m~ | find model |
|
|
|
|
| ~SPC m r f n~ | find migration |
|
|
|
|
| ~SPC m r f o~ | find log |
|
|
|
|
| ~SPC m r f p~ | find spec file |
|
|
|
|
| ~SPC m r f r~ | find rake task |
|
|
|
|
| ~SPC m r f s~ | find stylesheet file |
|
2017-07-29 18:20:56 +00:00
|
|
|
| ~SPC m r f S~ | find serializer file |
|
2015-07-04 03:33:13 +00:00
|
|
|
| ~SPC m r f t~ | find test |
|
|
|
|
| ~SPC m r f u~ | find fixture |
|
|
|
|
| ~SPC m r f v~ | find view |
|
|
|
|
| ~SPC m r f y~ | find layout |
|
|
|
|
| ~SPC m r f @~ | find mailer |
|
|
|
|
| ~SPC m r g c~ | go to current controller |
|
|
|
|
| ~SPC m r g d~ | go to DB schema |
|
|
|
|
| ~SPC m r g e~ | go to DB seeds |
|
|
|
|
| ~SPC m r g h~ | go to current helper |
|
|
|
|
| ~SPC m r g j~ | go to current javascript |
|
|
|
|
| ~SPC m r g g~ | go to Gemfile |
|
|
|
|
| ~SPC m r g m~ | go to current model |
|
|
|
|
| ~SPC m r g n~ | go to current migration |
|
|
|
|
| ~SPC m r g p~ | go to current spec |
|
|
|
|
| ~SPC m r g r~ | go to routes |
|
|
|
|
| ~SPC m r g s~ | go to current stylesheet |
|
|
|
|
| ~SPC m r g t~ | go to current test |
|
|
|
|
| ~SPC m r g u~ | go to current fixture |
|
|
|
|
| ~SPC m r g v~ | go to current view |
|
|
|
|
| ~SPC m r g z~ | go to spec helper |
|
|
|
|
| ~SPC m r g .~ | go to file at point (faster but less powerful than ~SPC m g g~) |
|
|
|
|
|
|
|
|
** Refactoring
|
|
|
|
|
|
|
|
| Key binding | Description |
|
|
|
|
|---------------+-----------------------------|
|
|
|
|
| ~SPC m r R x~ | extract region into partial |
|
|
|
|
|
|
|
|
** RUN commands
|
|
|
|
|
|
|
|
| Key binding | Description |
|
|
|
|
|---------------+----------------------|
|
2015-11-27 04:56:21 +00:00
|
|
|
| ~SPC m r :~ | run rake task |
|
2015-07-04 03:33:13 +00:00
|
|
|
| ~SPC m r c c~ | run rails generator |
|
|
|
|
| ~SPC m r i~ | start rails console |
|
|
|
|
| ~SPC m r s r~ | reload Rails project |
|
|
|
|
| ~SPC m r x s~ | start rails server |
|
|
|
|
|
|
|
|
** Ex-commands
|
|
|
|
|
|
|
|
| Key binding | Description |
|
|
|
|
|-------------+-----------------------------------------|
|
|
|
|
| ~:A~ | Switch between implementation and tests |
|