This is my activity
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
Deno.core.print("Middleware loaded\n"); | |
export function RequestHandler(/*req, res*/) { | |
//req.headers.set("X-Request-Middleware", "true"); | |
Deno.core.print("Request middleware\n"); | |
Deno.core.print("from a gist\n"); | |
}; | |
export function ResponseHandler(/*req, res*/) { | |
Deno.core.print("Response middleware\n"); | |
runjs.addHeader("x-header-from-middleware", "hello from a gist"); | |
}; |
I hereby claim:
- I am cdb on github.
- I am coderdaddy (https://keybase.io/coderdaddy) on keybase.
- I have a public key whose fingerprint is C920 10DD 440D 31C5 F6F6 245B 527E 12E1 5138 B9D6
To claim this, I am signing this object:
I hereby claim:
- I am cdb on github.
- I am coderdaddy (https://keybase.io/coderdaddy) on keybase.
- I have a public key ASAomLU8WCpiq8IOR8x1NBQ53NRrpYyU4sckIGWoXmVaxAo
To claim this, I am signing this object:
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
--type-add=ruby=.haml,.rake,.rsel,.builder | |
--type-add=html=.html.erb,.html.haml | |
--type-add=js=.js.erb | |
--type-add=yaml=.production,.staging,.erb | |
--type-add=css=.sass | |
--type-set=cucumber=.feature |
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 ActionController::Base | |
def rescues_path_with_facebooker(template_name) | |
if pretty_facebook_errors? | |
t = "#{RAILS_ROOT}/vendor/plugins/facebooker/templates/#{template_name}.erb" | |
File.exist?(t) ? t : rescues_path_without_facebooker(template_name) | |
else | |
rescues_path_without_facebooker(template_name) | |
end | |
end | |
alias_method_chain :rescues_path, :facebooker |
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
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe Activity do | |
it_should_belong_to :goal | |
it_should_validate_presence_of :goal_id, :date | |
end |