TIL, 2018-03-04, Vim is Slow in Rails.
- Vim has been unbearably slow in Rails projects. This repo works fine, Elixir repo works fine, but in Rails projects, ugh. I’m not sure if it’s a
CtrlP
thing or something else. - Currently looking at authentication solutions for Rails.
- There’s a thing called
ApiConstraints
? - Rails routes:
namespace
: prefixes the URL option, and try to locate under a module names in the same manner as the namespace. Simple.scope
: hasmodule
,path
, andas
:module
: controller directory location.path
: prefix set in the URL, before the resource name.as
: name of the path method used to identify the resources.
- Rails API constraints in the routes file:
- It’s nice, and I tried it out, I just need to add a fallback controller and tests.
- Setting up doorkeeper.
- It’s a standardized implementation of access tokens.
- To stub access:
allow(controller).to receive(:doorkeeper_token) { double(acceptable?: true) }
- Override the Rails helpers here. Customizing the response body when unauthorized. Testing Protected Controllers.