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 User | |
# ... | |
def method_missing(sym, *args) | |
if sym.to_s =~ /\A(.*)\?\z/ && ROLES.include?($1) | |
roles.include?($1) | |
else | |
super | |
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
${TM_SELECTED_TEXT/((\b[A-Z])|([A-Z]))/(?2:\l$2)(?3:_\l$3)/g} |
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
module Component::QuoteManager | |
class Configuration < Base | |
unloadable | |
# This is a hook that gets called whenever BreezeHQ is sending out a form response. | |
# The email still gets sent out, but this will let you grab the form responses | |
# when they're created. | |
# For sanity reasons, return message at the end. | |
def send_form_response(message) | |
QuoteProcessor.new(message.id).send_later(:process!) |