This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActionView::Template::Error: ReferenceError: window is not defined | |
from Object.<anonymous> ((execjs):43890:2) | |
from __webpack_require__ ((execjs):43857:30) | |
from (execjs):43877:18 | |
from (execjs):43880:10 | |
from /Users/can/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:15:in `rescue in block in initialize' | |
from /Users/can/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:12:in `block in initialize' | |
from /Users/can/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:75:in `block in lock' | |
from /Users/can/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:73:in `Locker' | |
from /Users/can/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:73:in `lock' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# requires fswatch | |
fswatch -o . -e "\\.git.*"| xargs -n1 -I{} git commit -am "snapshot from autocommit_script.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
S3KEY="CHANGE_ME" | |
S3SECRET="CHANGE_ME" | |
bucket='CHANGE_ME' | |
region='CHANGE_ME' | |
declare -a apps=("app1" "app2") | |
echo "Starting to backup - $(date)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Adveli | |
class CalendarsController < BaseController | |
authorize_resource :class => Calendar | |
before_filter :authenticate_account! | |
def index | |
@personal_calendar = current_account.authenticatable.calendar | |
@classroom_calendars = current_account.authenticatable.classroom_calendars | |
@school_calendar = Calendar.school_calendar | |
if current_account.authenticatable_type == "Adveli::Teacher" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
spec_hits = [] | |
checks = { | |
'_spec\.rb$' => ['focus:[:space:]*true'], | |
'\.rb$' => ['binding\.pry', 'debugger'] | |
} | |
# Find the names of all the filenames that have been (A)dded (C)opied or (M)odified | |
filenames = `git diff --cached --name-only --diff-filter=ACM`.split("\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include Devise::Controllers::Helpers | |
Deface::Override.new(:virtual_path => 'my_engine/layouts/application', | |
:name => 'change_width_of_main_content_div', | |
:set_attributes => 'div#main_content', | |
:attributes => {:class => 'span10'}) if signed_in? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=> {"question"=> | |
{"description"=>"foobar", "points"=>"10", "answer_type"=>"MultipleChoice"}, | |
"correct_answer"=>"on", | |
"options"=>["Foo", "Bar"], | |
"authenticity_token"=>"", | |
"action"=>"create", | |
"controller"=>"adveli/quizzes/questions", | |
"quiz_id"=>"1"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Quiz < ActiveRecord::Base | |
belongs_to :teacher | |
attr_accessible :time_limit, :title | |
validates_presence_of :title, :time_limit | |
validates :time_limit, :numericality => { :only_integer => true, :greater_than => 0 } | |
has_many :quiz_questions, :dependent => :destroy | |
has_many :true_false_questions, :through => :quiz_questions, :source => :question, :source_type => 'Adveli::TrueFalseQuestion', :dependent => :destroy | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Quizzer::TrueFalseQuestion | |
Failure/Error: it { should have_one(:quiz_question) } | |
NoMethodError: | |
undefined method `has_one?' for #<Quizzer::TrueFalseQuestion:0x007fa4d08d1928> | |
# ./spec/models/quizzer/true_false_question_spec.rb:4:in `block (2 levels) in <top (required)>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyApp | |
class Application < Rails::Application | |
if Rails.env == 'test' | |
require 'diagnostic' | |
config.middleware.use(MyApp::DiagnosticMiddleware) | |
end | |
end | |
end |
NewerOlder