Show Menu

Vue on Rails Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Setting up Vue on Rails project

rails vue install
setup vue on rails for cdn
rails vue webpacker
setup the webpacker on Vue on Rails
rails vue assets­:in­stall
install vue.js into assets pipeline
rails g vue <na­me>
generate vue component
<%= vue "­nam­e" %>
set the location where there vue component will be mounted
rails g vue <na­me> --turb­olink
a vue component with turbo link support
rails g vue
Quick setup for Vue on Rails project

Scaffo­lding of Vue component

quickly creating indepe­ndent component in Vue on Rails

Scaffo­lding with Turbolink support


Vuex on Rails

Painless vuex state management for Vue on Rails


a form component for Vue on Rails project

Seperation of concern for Vue component


Autolo­ading of Vue component


Page Specific Vue component

Run page specific vue component that smoothly on Rails


Other tricks for Vue on Rails projects