Skip to content

Instantly share code, notes, and snippets.

View esparkman's full-sized avatar

Evan Sparkman esparkman

View GitHub Profile
@esparkman
esparkman / error
Last active September 9, 2018 01:15
vue.runtime.esm.js?2b0e:587 [Vue warn]: Property or method "policy_holder" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
found in
---> <PolicyHolder> at src/components/PolicyHolder.vue
<App> at src/App.vue
<Root>
warn @ vue.runtime.esm.js?2b0e:587
warnNonPresent @ vue.runtime.esm.js?2b0e:1872
get @ vue.runtime.esm.js?2b0e:1914
{
"editor.fontSize": 16,
"editor.fontLigatures": true,
"editor.fontFamily": "Fira Code",
"editor.tabSize": 2,
"editor.minimap.enabled": false,
"terminal.integrated.fontSize": 14,
"terminal.integrated.scrollback": 10000,
"git.path": "/usr/bin/git",
"workbench.colorTheme": "Dracula Soft",
@esparkman
esparkman / form_object.rb
Created May 4, 2018 15:22
Form Object Example
# used to share results from one user to another
# ensures that valid data is supplied and errors out if the parameters are invalid
class BookingFormModel
include ActiveModel::Model
attribute :first_name, :string
attribute :last_name, :string
attribute :stay_duration_days, :integer
def persisted?
NameError: uninitialized constant Datadog
/var/www/apps/legacy_dashboards_staging/releases/20180302190521/config/initializers/datadog_tracer.rb:3:in `<top (required)>'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties-3.2.22.5/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties-3.2.22.5/lib/rails/engine.rb:592:in `each'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties-3.2.22.5/lib/rails/engine.rb:592:in `block in <class:Engine>'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties-3.2.22.5/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties-3.2.22.5/lib/rails/initializable.rb:30:in `run'
/var/www/apps/legacy_dashboards_staging/shared/bundle/ruby/2.3.0/gems/railties-3.2.22.5/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/apps/legacy_dashboa
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
<div class="header">
<div class="header-img" style="background-image: url('/assets/inside.jpg')">
<button data-toggle="modal" data-target=".photos-modal" class="view-photos">View Photos</button>
</div>
<div class="modal fade photos-modal" tabindex="-1" role="dialog" data-focus="true" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><%= @rental.title %></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
actioncable (5.1.4) lib/action_cable/server/configuration.rb:25:in `pubsub_adapter'
actioncable (5.1.4) lib/action_cable/server/base.rb:76:in `block in pubsub'
/Users/evansparkman/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
actioncable (5.1.4) lib/action_cable/server/base.rb:76:in `pubsub'
actioncable (5.1.4) lib/action_cable/server/broadcasting.rb:46:in `block in broadcast'
activesupport (5.1.4) lib/active_support/notifications.rb:168:in `instrument'
actioncable (5.1.4) lib/action_cable/server/broadcasting.rb:44:in `broadcast'
actioncable (5.1.4) lib/action_cable/server/broadcasting.rb:23:in `broadcast'
App.products = App.cable.subscriptions.create("ProductsChannel", {
connected: function() {
// Called when the subscription is ready for use on the server
},
disconnected: function() {
// Called when the subscription has been terminated by the server
},
received: function(data) {
class ProductsController < ApplicationController
before_action :set_product, only: [:show, :edit, :update, :destroy]
# GET /products
# GET /products.json
def index
@products = Product.all
end
# GET /products/1
@esparkman
esparkman / store.js
Created September 1, 2017 03:17
Conditionally check each key on the payload object?
updateCustomer ({commit}, payload) {
commit('setLoading', true)
const customer = {}
if (payload.first_name) {
customer.first_name = payload.first_name
}
if (payload.last_name) {
customer.last_name = payload.last_name
}
if (payload.gender) {