Use it in Rails controllers like `t`?
doits opened this issue · comments
Markus commented
Is there any way to use it in controllers like t
? I know I can use it with view_context.it
, but then I lose automatic scoping (view_context.it('.something')
gives a Cannot use t(".something") shortcut because path is not available
). t
on the other hand works like in views getting the scope from controller name and action.
If you had an idea where to start/look in the source I could try to make a PR implementing this.
Enrico commented
Try It.it(...)