Watch
1
0
Fork
You've already forked vim-rails
0
mirror of https://github.com/tpope/vim-rails.git synced 2026-11-17 02:20:31 +00:00
6 Projection Recipes
Jason Marmon edited this page 2016-02-08 20:18:01 -05:00

Find here some common projection recipes for gems. For more information on how to use them, consult :help rails-projections.

Activeadmin

let g:rails_gem_projections = {
  \ "activeadmin": {
  \   "app/admin/*.rb": {
  \     "command": "admin",
  \     "affinity": "model",
  \     "alternate": "app/models/{}.rb",
  \     "template": "ActiveAdmin.register {} do\nend"}}
}

Fabrication

let g:rails_gem_projections = {
  \ "fabrication": {
  \   "spec/fabricators/*_fabricator.rb": {
  \     "command": "fabricator",
  \     "affinity": "model",
  \     "alternate": "app/models/{}.rb",
  \     "related": "db/schema.rb#{plural}",
  \     "test": "spec/models/{}_spec.rb",
  \     "template": "Fabricator :{} do\nend"}}
}