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
# This ensures that jQuery is reinitialized after the page:change event | |
gem 'jquery-turbolinks' |
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
# I didn't know that this test made the captured variable available as local variables. | |
if /(?<x>\d+)/ =~ "foo 123 bar" | |
puts x | |
end | |
# => 123 |
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
### Keybase proof | |
I hereby claim: | |
* I am billhorsman on github. | |
* I am billhorsman (https://keybase.io/billhorsman) on keybase. | |
* I have a public key whose fingerprint is D96D 6222 E6CB 8A78 E03F A1A0 6C5C E69B 98D5 42B5 | |
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
class ApplicationController < ActionController::Base | |
# Rather than return a 500 (internal server error) let's just say we can't | |
# find what they are looking for. Typically, this is when someone hits one | |
# of our valid routes but asks for the .xml format or something. | |
rescue_from ActionController::UnknownFormat, with: :raise_unknown_format | |
def raise_unknown_format | |
render plain: 'Unknown Format', status: :not_found | |
end |
OlderNewer