Skip to content

Instantly share code, notes, and snippets.

View ejlangev's full-sized avatar

Ethan Langevin ejlangev

View GitHub Profile
@ejlangev
ejlangev / gist:11301858
Created April 25, 2014 20:18
Make sure all bounce venues are in the same city as their parent venue
Venue.where('bounce_venue_id IS NOT NULL').includes(:bounce_venue).select { |v| v.city_id != v.bounce_venue.city_id }.map(&:id)
@ejlangev
ejlangev / dare_update.rb
Created April 25, 2014 20:13
For updating dare category
Dare.where(category: 'Next Level').update_all(category: "Next Level Dares")
Dare.where(category: 'Warm Up').update_all(category: 'Get Warmed Up')
feature "Short Messaging" do
let(:member) { create(:member) }
let(:admin) { create(:admin) }
let(:message) {
GrouperShortMessager.custom_message(message, admin, "Hello, World!")
}
around do |example|
previous_value = Resque.inline
class Postman
include Interactor
def perform
if should_send_push_notification?
Postman::SendPushNotification.perform(context)
else
Postman::SendTextMessage.perform(context)
end
class Postman
include Interactor
def perform(context)
create_message_log
CreateMessageSummary.perform(context)
EnqueueMessageJob.perform(context)

Keybase proof

I hereby claim:

  • I am ejlangev on github.
  • I am ejlangev (https://keybase.io/ejlangev) on keybase.
  • I have a public key whose fingerprint is 81F7 F97E A17A A08F 700B E0D3 12B5 3827 1EB8 6F18

To claim this, I am signing this object: