Skip to content

Instantly share code, notes, and snippets.

View vspar's full-sized avatar

Vic Spanner vspar

View GitHub Profile
@vspar
vspar / application_record.rb
Created November 4, 2021 12:33
rake task to create dev database test fixtures for rspec
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
#
# adapted from an original article here:
# https://stackoverflow.com/questions/6591722/how-to-generate-fixtures-based-on-my-development-database
#
# the code below is for rspec, for minitest just replace /spec with /test
#
def dump_fixture
@vspar
vspar / rails6_webpacker_bootstrap.md
Last active August 28, 2019 12:02
rails6 + webpacker + bootstrap
$ rails new myapp
$ cd myapp
$ yarn add bootstrap jquery popper.js
$ mkdir myapp/app/javascript/packs/stylesheets
$ touch myapp/app/javascript/packs/stylesheets/application.scss
git diff default/config/webpack/environment.js myapp/config/webpack/environment.js