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
# Credentials | |
AWS.config(access_key_id: ENV['AWS_KEY_ID'], secret_access_key: ENV['AWS_ACCESS_KEY']) | |
# Get the queue | |
sqs = AWS::SQS.new | |
queue = sqs.queues.create('search-service-uat') | |
# This will run forever, listening for messages and processing them | |
queue.poll do |message| | |
event = Hashie::Mash.new(JSON.parse(message.body)) |
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
{ | |
"playbook": { | |
"name": "{{lang 'name'}}", | |
"_id": "playbook1", | |
"language": { | |
"en-US": { | |
"name": "Marketing Playbook 1" | |
}, | |
"phases": ["phase1", "phase2"], | |
"type": "playbook" |
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 ApplicationController < ActionController::Base | |
before_filter :define_resource_params, if: :devise_controller? | |
protected | |
def define_resource_params | |
if ((self.class <= Devise::PasswordsController) || (self.class <= Devise::RegistrationsController)) | |
self.class.send(:define_method, :resource_params) do | |
params.require(resource_name).permit(:email, :password, :password_confirmation) | |
end |