2015-12-02 14:23:39 +00:00
|
|
|
#+TITLE: Ruby on Rails layer
|
2015-07-04 03:33:13 +00:00
|
|
|
|
2019-05-07 08:21:07 +00:00
|
|
|
#+TAGS: framework|layer|programming
|
2019-05-02 21:49:30 +00:00
|
|
|
|
2015-07-04 03:33:13 +00:00
|
|
|
[[file:img/ror.png]]
|
|
|
|
|
2019-05-07 20:05:06 +00:00
|
|
|
* Table of Contents :TOC_5_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:
|
2018-09-19 03:54:47 +00:00
|
|
|
- Quick file navigation with with [[https://github.com/asok/projectile-rails][projectile-rails]]
|
|
|
|
- Run server
|
|
|
|
- Run generators
|
|
|
|
- Rake runner
|
|
|
|
- Interactive Rails console
|
2017-08-31 16:25:47 +00:00
|
|
|
|
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
|
|
|
|
|
2018-06-02 13:37:56 +00:00
|
|
|
| Key binding | Description |
|
|
|
|
|---------------+-----------------------------------------------------------------|
|
|
|
|
| ~SPC m f f a~ | find localization file |
|
2018-07-18 07:48:44 +00:00
|
|
|
| ~SPC m f f b~ | find job |
|
2018-06-02 13:37:56 +00:00
|
|
|
| ~SPC m f f c~ | find controller |
|
|
|
|
| ~SPC m f f e~ | find environment file |
|
|
|
|
| ~SPC m f f f~ | find feature |
|
|
|
|
| ~SPC m f f h~ | find helper |
|
|
|
|
| ~SPC m f f i~ | find initializer |
|
|
|
|
| ~SPC m f f j~ | find javascript file |
|
|
|
|
| ~SPC m f f l~ | find library |
|
|
|
|
| ~SPC m f f m~ | find model |
|
|
|
|
| ~SPC m f f n~ | find migration |
|
|
|
|
| ~SPC m f f o~ | find log |
|
|
|
|
| ~SPC m f f p~ | find spec file |
|
|
|
|
| ~SPC m f f r~ | find rake task |
|
|
|
|
| ~SPC m f f s~ | find stylesheet file |
|
|
|
|
| ~SPC m f f S~ | find serializer file |
|
|
|
|
| ~SPC m f f t~ | find test |
|
|
|
|
| ~SPC m f f u~ | find fixture |
|
|
|
|
| ~SPC m f f v~ | find view |
|
2018-07-18 07:48:44 +00:00
|
|
|
| ~SPC m f f w~ | find webpack config |
|
2018-06-02 13:37:56 +00:00
|
|
|
| ~SPC m f f y~ | find layout |
|
|
|
|
| ~SPC m f f @~ | find mailer |
|
|
|
|
| ~SPC m f g c~ | go to current controller |
|
|
|
|
| ~SPC m f g d~ | go to DB schema |
|
|
|
|
| ~SPC m f g e~ | go to DB seeds |
|
|
|
|
| ~SPC m f g h~ | go to current helper |
|
|
|
|
| ~SPC m f g j~ | go to current javascript |
|
|
|
|
| ~SPC m f g g~ | go to Gemfile |
|
|
|
|
| ~SPC m f g m~ | go to current model |
|
|
|
|
| ~SPC m f g n~ | go to current migration |
|
|
|
|
| ~SPC m f g p~ | go to current spec |
|
|
|
|
| ~SPC m f g r~ | go to routes |
|
|
|
|
| ~SPC m f g s~ | go to current stylesheet |
|
|
|
|
| ~SPC m f g t~ | go to current test |
|
|
|
|
| ~SPC m f g u~ | go to current fixture |
|
|
|
|
| ~SPC m f g v~ | go to current view |
|
|
|
|
| ~SPC m f g z~ | go to spec helper |
|
|
|
|
| ~SPC m f g .~ | go to file at point (faster but less powerful than ~SPC m g g~) |
|
2015-07-04 03:33:13 +00:00
|
|
|
|
|
|
|
** Refactoring
|
|
|
|
|
2018-06-02 13:37:56 +00:00
|
|
|
| Key binding | Description |
|
|
|
|
|---------------+-----------------------------|
|
|
|
|
| ~SPC m f R x~ | extract region into partial |
|
2015-07-04 03:33:13 +00:00
|
|
|
|
|
|
|
** RUN commands
|
|
|
|
|
2018-06-02 13:37:56 +00:00
|
|
|
| Key binding | Description |
|
|
|
|
|---------------+----------------------|
|
|
|
|
| ~SPC m f :~ | run rake task |
|
|
|
|
| ~SPC m f c c~ | run rails generator |
|
2018-07-18 07:48:44 +00:00
|
|
|
| ~SPC m f c d~ | run rails destroy |
|
2018-06-02 13:37:56 +00:00
|
|
|
| ~SPC m f i~ | start rails console |
|
|
|
|
| ~SPC m f s r~ | reload Rails project |
|
|
|
|
| ~SPC m f x s~ | start rails server |
|
2015-07-04 03:33:13 +00:00
|
|
|
|
|
|
|
** Ex-commands
|
|
|
|
|
|
|
|
| Key binding | Description |
|
|
|
|
|-------------+-----------------------------------------|
|
|
|
|
| ~:A~ | Switch between implementation and tests |
|