Last active
August 29, 2015 14:13
-
-
Save qrush/54de0eccf23e3a5cd51b to your computer and use it in GitHub Desktop.
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 NotificationsController < ApplicationController | |
def create | |
if subject = params["subject"] | |
if subject =~ /succeed/ | |
message = ":+1:" | |
else | |
message = ":-1:" | |
end | |
message << " #{subject}" | |
if link = Nokogiri::HTML(params["stripped-html"]).at_css("a[href*='bots']") | |
message << ": #{link["href"]}" | |
end | |
# replace with Tinder, or whatever API you use for your chat room! | |
Dash.announcer.say message | |
end | |
head :ok | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment