$ rails g model User
belongs_to
has_one
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
# Using these pry gems -- copy to your Gemfile | |
# group :development, :test do | |
# gem 'awesome_print' # pretty print ruby objects | |
# gem 'pry' # Console with powerful introspection capabilities | |
# gem 'pry-byebug' # Integrates pry with byebug | |
# gem 'pry-doc' # Provide MRI Core documentation | |
# gem 'pry-rails' # Causes rails console to open pry. `DISABLE_PRY_RAILS=1 rails c` can still open with IRB | |
# gem 'pry-rescue' # Start a pry session whenever something goes wrong. | |
# gem 'pry-theme' # An easy way to customize Pry colors via theme files | |
# end |
require 'rails_helper' | |
RSpec.describe TodosController, :type => :controller do | |
describe "GET #index" do | |
#describe "POST #create" do | |
#describe "GET #show" do | |
#describe "PATCH #update" do (or PUT #update) | |
#describe "DELETE #destroy" do | |
#describe "GET #new" do |
<!DOCTYPE html> | |
<html> | |
<body> | |
<p>The dog <span id="edit" contenteditable="true">sleeps on</span> the sofa</p> | |
<script type="text/javascript"> | |
var handler = { | |
onBackspace: function() { | |
console.log("backspace"); | |
}, |
https://gist.github.com/geekcui/ce0bda3dc40d048666fe904c0a2f1017
https://github.com/geekcui/tensorflow-macos-egpu
macOS: 10.13.3
WebDriver: 387.10.10.10.25.156
Install the custom CSS plugin, then make a file on your computer that will hold your custom CSS, I like to make one in my home directory called ~/.vscodestyles.css
and then add the CSS into it.
Once done, open your command palette and select enable custom CSS and JS
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
# ---- Build Stage ---- | |
FROM erlang:22-alpine AS app_builder | |
# Set environment variables for building the application | |
ENV MIX_ENV=prod \ | |
TEST=1 \ | |
LANG=C.UTF-8 | |
# Fetch the latest version of Elixir (once the 1.9 docker image is available you won't have to do this) | |
RUN set -xe \ |