This file contains hidden or 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 AdminController < ApplicationController | |
rescue_from Acl9::AccessDenied, with: :unauthorized_redirect | |
before_filter :require_user | |
access_control do | |
allow :admin | |
end | |
def show |
This file contains hidden or 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
<p><%=t :company_name %></p> |
This file contains hidden or 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
user_ids = [33059,48036,102589,7855,28242,34357,32814,105563,49276,13742,55687,52362,101326,104011,59650,47441,34356,9943,15500,45671,50681,48829,50681,57270,6514,6871,101326,33059,7855,48036,6514,6514,47441,102589,10755,34357,28242,34357,34357,26495,87999,24526,110477,41230,29370,31488,62817,107890,91591,27546,58165,101840,102836,59052,30103,10491,22178,6007,18346,32969,28227,50915,60469,10532,91591,101326,62817,58066,16894,58165,102589,91591,46802,91591,31488,31488,57080,57080,91591,58165,31488,52913,52913,29882,55808] | |
user_ids.each do |user_id| | |
user = User.find_by_id(user_id) | |
user.delay.recalculate_completions! unless user.nil? | |
end |
This file contains hidden or 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.exports = { | |
instructions: "Here are the instructions", | |
success:function(expression) { | |
expression.hasString(); | |
} | |
} |
This file contains hidden or 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
javascript:(function(){document.getElementById("content").style.cssText = "display:block";document.getElementById("mw-sopaOverlay").style.cssText = "display:none";})(); |
This file contains hidden or 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 'csv' | |
def transform_merge(csv_file) | |
CSV.open(@csv_file).read.each do |line| | |
end | |
end | |
def multiple_merge(inputs) | |
errors = [] |
This file contains hidden or 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
def merge(user1, user2, preferred_email) | |
raise "Email cannot be the same" if (user1 == user2) | |
u = User.unscoped.find_by_email(user1) | |
u2 = User.unscoped.find_by_email(user2) | |
raise "User1 not found" if u.nil? | |
raise "User2 not found" if u2.nil? | |
if u.alternate_ids.empty? |
This file contains hidden or 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
log = Logger.new("/tmp/whos_behind.log") | |
log.info "Producer Number, Full Name, Email, Party Key, Agency Status, Personal Status, Completed Elective Points, Outstanding Essentials" | |
Certification.where(["code IN(?)", [:agent, :lsp]]).each do |certification| | |
certification.users.limit(10).each do |user| | |
if user.party_type == 'Agent' | |
organization = user.organization | |
agency_status = organization.status |
This file contains hidden or 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 Owner | |
class Response | |
def each | |
10.times do |i| | |
yield("entry #{i}\n") | |
sleep 1 | |
end | |
end | |
end |
This file contains hidden or 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
// (c) 2010 Cameron Westland, Big Bang Technology Inc. | |
// Backbone may be freely distributed under the MIT license. | |
// For all details and documentation: | |
// http://bigbangtechnology.github.com/stately | |
/** | |
Example: | |
var MyView = Backbone.View.extend(Stately).extend({ | |
states: { | |
EDITING: "editing", |