Skip to content

Instantly share code, notes, and snippets.

development:
adapter: postgresql
encoding: unicode
database: my_rails_app_development
pool: 5
username: my_rails_app
test:
adapter: postgresql
encoding: unicode
database: my_rails_app_test
[~] bundle install
[~] createuser
Enter name of role to add: my_rails_app
Shall the new role be a superuser? (y/n) y
[~] which psql
/usr/local/bin/psql</pre>
[~] brew install postgres
/usr/local/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin
class AdminController < ApplicationController
rescue_from Acl9::AccessDenied, with: :unauthorized_redirect
before_filter :require_user
access_control do
allow :admin
end
def show
<p><%=t :company_name %></p>
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
module.exports = {
instructions: "Here are the instructions",
success:function(expression) {
expression.hasString();
}
}