I hereby claim:
- I am samsm on github.
- I am samsm (https://keybase.io/samsm) on keybase.
- I have a public key whose fingerprint is EDAC D3BE 23FB 52E2 B532 62FC 5C3A A2B3 0769 A1A3
To claim this, I am signing this object:
| # Annoyances | |
| 127.0.0.1 meebo.com | |
| 127.0.0.1 cim.meebo.com | |
| 127.0.0.1 www.meebo.com | |
| 127.0.0.1 s.meebocdn.net | |
| 127.0.0.1 rd.meebo.com |
| class Ability | |
| include CanCan::Ability | |
| def initialize(user) | |
| if user.admin? | |
| can :manage, Resque | |
| end | |
| end | |
| end |
| module Bar | |
| module Baz | |
| end | |
| def hi_there | |
| puts 'Hi!!' | |
| end | |
| end | |
| class Foo |
| 1) Error: | |
| test_0001_should generate form with method=get(integration search_form_for): | |
| ArgumentError: wrong number of arguments (1 for 2) | |
| /spec/minitest_helper.rb:68:in `block (3 levels) in formed_class' | |
| /gems/actionpack-3.2.9/lib/action_dispatch/routing/polymorphic_routes.rb:129:in `polymorphic_url' | |
| /gems/actionpack-3.2.9/lib/action_dispatch/routing/polymorphic_routes.rb:135:in `polymorphic_path' | |
| /gems/actionpack-3.2.9/lib/action_view/helpers/form_helper.rb:397:in `apply_form_for_options!' | |
| /gems/actionpack-3.2.9/lib/action_view/helpers/form_helper.rb:370:in `form_for' | |
| /lib/mundane-search/view_helpers.rb:10:in `search_form_for' | |
| /spec/search_form_for_integration_spec.rb:15:in `block (2 levels) in <top (required)>' |
| # Hack to get strong_parameters working | |
| CanCan::ControllerResource | |
| class CanCan::ControllerResource | |
| protected | |
| # Before using @params[whatever], CanCan will try calling whatever_params | |
| def resource_params_by_namespaced_name | |
| @controller.send(:"#{extract_key(namespaced_name)}_params") | |
| rescue NoMethodError |
I hereby claim:
To claim this, I am signing this object:
| class QuitWhenEmpty | |
| def initialize(options=nil) | |
| end | |
| def call(worker, msg, queue) | |
| yield | |
| stop_disposible_worker_if_queue_empty! | |
| end | |
| private |
Here are all of the resources mentioned by Deconstruct 2017 speakers, along with who recommended what. Please post a comment if I missed something or have an error!
| # coding: utf-8 | |
| lib = File.expand_path('../lib', __FILE__) | |
| $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | |
| # require "something/version" <- hells no | |
| Gem::Specification.new do |spec| | |
| spec.name = "something" | |
| spec.version = "1.2.3" # <- makes sense here, right? | |
| # ... gemspec guts ... |
| # yield is like "do the thing that is in the block" | |
| def do_twice | |
| yield | |
| puts "again!" | |
| yield | |
| end | |
| do_twice { puts "hello world" } | |
| do_twice do |