The ultimate humiliation. Given for not adhering to whitespace guidelines.
For using the wrong Emoij
module ActionView | |
module Helpers | |
module TranslationHelper | |
# Override translate method to consider translate_scope. | |
def translate(key, options = {}) | |
I18n.translate(key, {:raise => I18n.raise_on_missing, :scope => (translate_scope.dup << options.delete(:add_scope)).compact}.merge(options)) | |
end | |
alias :t :translate | |
# Append scopes to the current translation scope. |
module I18n | |
class SuicidalMissingTranslationData < RuntimeError; end | |
class << self | |
def translate_with_suicidal_exceptions(*args) | |
translate_without_suicidal_exceptions(*args) | |
rescue I18n::MissingTranslationData => e | |
if %w(test cucumber).include? ENV['RAILS_ENV'] | |
raise I18n::SuicidalMissingTranslationData, e | |
elsif %(staging production).include? ENV['RAILS_ENV'] |
class window.DataToggle | |
get: (str) -> | |
$("##{str}") | |
ids: (type, e) -> | |
$(e).attr("data-#{type}").split(' ') | |
constructor: -> | |
_self = @ | |
_self.data_show(_self, $(e).parent()) for e in $('[data-show]') | |
_self.data_hide(_self, $(e).parent()) for e in $('[data-hide]') |
RSpec::Matchers.define :inherit_from do |superclass| | |
match do |klass| | |
klass.class.ancestors.include? superclass | |
end | |
failure_message_for_should do |klass| | |
"expected #{klass.class.name} to inherit from #{superclass}" | |
end | |
failure_message_for_should_not do |klass| |
I hereby claim:
To claim this, I am signing this object: