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
# runs other rake tasks with domain scoping applied. | |
# Like so: | |
# bundle exec rake domain:one TASK=namespace:task DOMAIN=customer1.example.com | |
# bundle exec rake domain:all TASK=namespace:task | |
namespace :domain do | |
desc 'Run a rake task ENV[TASK] on a single domain ENV[DOMAIN]' | |
task :one => :environment do | |
raise Exception.new, "You must provide ENV['TASK'] and ENV['DOMAIN']" if ENV['TASK'].nil? || ENV['DOMAIN'].nil? |
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
App.UsersController = Ember.ArrayController.extend({ | |
sortProperties: ['name'], | |
sortAscending: true, | |
reSort: function(sortBtnValue) { | |
var sortProperty = this.get('sortProperties')[0]; | |
if (sortProperty == sortBtnValue) { | |
if (this.get('sortAscending')) { | |
this.set('sortAscending', false); | |
} else { |
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
# Monogid Models | |
class Employee | |
include Mongoid::Document | |
include Mongoid::Timestamps | |
field :ssid, type: String | |
field :name, type: String | |
index :name |
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 'rubygems' | |
require 'mail' | |
require 'savon' | |
# I needed to send "SOAP with Attachments" and found soap4r too horrible. | |
# Since I saw no support for it in Savon I tried to hack something together | |
# to see if it could be done. I share that messy code here | |
# this is updated for Savon 0.8.1 |