Skip to content

Instantly share code, notes, and snippets.

View drumusician's full-sized avatar

Tjaco Oostdijk drumusician

View GitHub Profile
@drumusician
drumusician / devise_custom_params.md
Last active May 19, 2018 22:31
Devise add custom permitted params #rails #devise

Add as a Controller Concern

module DeviseWhitelist
  include ActiveSupport::Concern
  
  included do
    before_filer :configure_permitted_params, if devise_controller?
  end
 
@drumusician
drumusician / React_Hot_Module_Reloading.md
Last active May 14, 2018 07:55
React Hot Module Reloading #react #hot_reload #webpack

How to setup Hot Module Reloading as per Brian Holts FrontendMasters Course:

  1. .babelrc
"plugins": [
	"react-ho-loader/babel",
]

Keybase proof

I hereby claim:

  • I am drumusician on github.
  • I am tjaco (https://keybase.io/tjaco) on keybase.
  • I have a public key ASA7Anp5feL15uwiH_0negDILo0zflJYxHk0LMCmHm7KwAo

To claim this, I am signing this object:

require 'spec_helper'
feature "User creates a user profile" do
scenario "User does not have a profile yet" do
sign_in_user
visit '/users/require "spec_helper"
feature "feature" do
scenario "User creates a new widget" do
require "spec_helper"
feature "Widget management" do
scenario "User creates a new widget" do
visit "/widgets/new"
fill_in "Name", :with => "My Widget"
click_button "Create Widget"
expect(page).to have_text("Widget was successfully created.")