🤹♂️
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
def destroy | |
authorize! :destroy, @health_professional | |
@health_professional.destroy | |
respond_with :manage, @health_professional | |
end |
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
#compdef gem gem1.9 | |
gem_general_flags=("(-h --help)"{-h,--help}"[Get help on this command]" | |
"(-V --verbose)"{-V,--verbose}"[Set the verbose level of output]" | |
"(-q --quiet)"{-q,--quiet}"[Silence commands]" | |
"--config-file[Use this config file instead of default]:file:_files" | |
"--backtrace[Show stack backtrace on errors]" | |
"--debug[Turn on Ruby debugging]" | |
$nul_arg | |
) |
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
FactoryGirl.define do | |
factory :business | |
factory :client do | |
business | |
first "Homer" | |
end | |
factory :appointment do | |
client |
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
# For a start, a little refactoring doesn't hurt: | |
def display_friend_discounts(user) | |
if cart_item.friends.size > 0 | |
safe_join cart_item.friends.map do |friend| | |
render partial:"#{PPATH}friend_discount_row", object: friend, locals: {savings: PRICE['friend_discount'][user.veteran_status.to_s], cart_item: cart_item} | |
end | |
end || "" | |
end |
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
# we need to protect against multiple includes of the Rails environment (trust me) | |
require 'config/environment' if !defined?(Rails) || !Rails.initialized? | |
require 'sprockets' | |
unless Rails.env.production? | |
map '/assets' do | |
run Sprockets::Environment.new Rails.root do |sprockets| | |
sprockets.logger = Rails.logger | |
["app", "lib", "vendor"].map { |prefix| Rails.root.join(prefix, "assets") }.select(&:exist?).map { |p| p.children.select(&:directory?) }.flatten.each &sprockets.method(:append_path) |
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 'formula' | |
class Macvim < Formula | |
homepage 'http://code.google.com/p/macvim/' | |
version '7.3-61' | |
head 'https://github.com/alloy/macvim.git', :branch => 'split-browser-lion-merge' | |
def options | |
[ | |
# Building custom icons fails for many users, so off by default. |
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
jQuery ($) -> | |
$form = $("form") | |
$form.find("radio.action-switcher").change -> | |
if $(this).prop("checked") and $(this).val() == "register" | |
$form.attr "action", $form.data("register-action") | |
else | |
$form.attr "action", $form.data("login-action") |
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
var $.fn.fingerScroll = function () { | |
this.each(function () { | |
$(this).on({ | |
mousedown: $.fn.fingerScroll.mouseDown, | |
mouseup: $.fn.fingerScroll.mouseUp, | |
}); | |
}); | |
}; | |
$.extend($.fn.fingerScroll, { |
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
FFW = | |
g: (i) -> document.getElementById(i) | |
gv: (i) -> @g(i).value | |
sv: (i, v) -> @g(i).value = v | |
a: (i, c=document) -> c.getElementsByTagName(i) | |
ss: (i, v, n) -> @g(i).style[v] = n | |
misc: {} | |
effect: {} | |
event: {} | |
browser: {} |
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
= extends :html5_base do | |
- append :head do | |
meta(http-equiv="X-UA-Compatible" content="IE=edge") | |
title Lolwut | |
= area :assets do | |
= javascript_include_tag 'application' | |
= yield | |
#fb-root |
OlderNewer