View implicit_hashing_struct.rb
1 2 3 4 5 6 7 8 9 10
Flub = Struct.new(:foo, :bar) do
def to_hash; to_h; end
end
 
def named(foo:, bar:)
p "foo: #{foo}"
p "bar: #{bar}"
end
 
named(**Flub.new(1, 2))
View stacktrace.txt
1 2 3 4 5 6 7 8 9 10
Uncaught TypeError: Cannot read property 'shouldSupercede' of undefinedvendor.js:59348
__exports__.default.subclass.applyToHandlersvendor.js:59287
__exports__.default.subclass.applyToStatevendor.js:58713
Router.applyIntentvendor.js:39545
calculatePostTransitionStatevendor.js:39328
EmberObject.extend._hydrateUnsuppliedQueryParamsvendor.js:39269
EmberObject.extend._prepareQueryParamsvendor.js:34131
computeLinkViewHrefvendor.js:25813
ComputedPropertyPrototype.getvendor.js:31070
getvendor.js:55606
View dropdown-menu.js
1 2 3 4 5 6 7 8 9
import Ember from "ember";
 
export default Ember.Component.extend({
tagName: 'nav',
classNames: ['navDropdown'],
classNameBindings: ['isDropdownVisible:is--open'],
ariaRole: 'navigation',
 
isDropdownVisible: false,
View console.txt
1 2 3 4
git:(develop) ✗ ember g server users
version: 0.1.3
valid watchman found, version: [3.0.0]
Unknown blueprint: server
View dropdown-menu.hbs
1 2
<button class="navDropdown__button" {{action "toggleNavigationDropdown" target="view"}}>{{view.title}}</button>
{{yield}}
View delegating_form_object.rb
1 2 3 4 5 6 7 8 9
class PartialReportForm
include DelegatingFormObject.new(Report)
 
delegate :name, :name=,
to: :report
 
validates :name,
presence: true
end
View zones.rb
1 2 3 4 5 6 7 8 9 10
# this comes included in ActiveSupport 4+
unless ActiveSupport::VERSION::MAJOR > 3
require 'date'
 
module DateAndTime
module Zones
# Returns the simultaneous time in <tt>Time.zone</tt> if a zone is given or
# if Time.zone_default is set. Otherwise, it returns the current time.
#
# Time.zone = 'Hawaii' # => 'Hawaii'
View have_xml.rb
1 2 3 4 5 6 7 8 9 10
require 'nokogiri'
 
RSpec::Matchers.define :have_xml do |xpath, matcher|
match do |body|
doc = Nokogiri::XML::Document.parse(body)
nodes = Array(doc.xpath(xpath))
nodes.map! { |node| node.respond_to?(:content) ? node.content : node }
 
if nodes.empty?
false
View spec_helper.rb
1 2 3 4 5 6 7 8 9 10
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
 
require 'rspec/rails'
require 'rspec/autorun'
 
require 'capybara/rspec'
require 'capybara/rails'
 
# Requires supporting ruby files with custom matchers and macros, etc,
Something went wrong with that request. Please try again.