Skip to content

Instantly share code, notes, and snippets.

Raimond Garcia voodoorai2000

Block or report user

Report or block voodoorai2000

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@voodoorai2000
voodoorai2000 / stats_controller_spec.rb
Last active Mar 5, 2018
Make stats_controller_spec.rb aware of timezones
View stats_controller_spec.rb
context 'events present' do
let(:time_1) { DateTime.parse("2015-01-01").in_time_zone }
let(:time_2) { DateTime.parse("2015-01-02").in_time_zone }
let(:time_3) { DateTime.parse("2015-01-03").in_time_zone }
before do
create :ahoy_event, name: 'foo', time: time_1
create :ahoy_event, name: 'foo', time: time_1
create :ahoy_event, name: 'foo', time: time_2
create :ahoy_event, name: 'bar', time: time_1
@voodoorai2000
voodoorai2000 / skipping verification.txt
Last active Dec 7, 2017
CONSUL - Skipping census and sms verification
View skipping verification.txt
#add this line to `config/application.rb`
config.paths['app/models/concerns'].unshift(Rails.root.join('app', 'models', 'concerns', 'custom'))
#add you custom implementation to `app/models/concerns/custom/verification.rb`, for example:
require_dependency Rails.root.join('app', 'models', 'concerns', 'verification').to_s
module Verification
extend ActiveSupport::Concern
def residence_verified?
View text to i18n keys
#you will need this gem
#http://github.com/balinterdi/i15r
namespace :i18n do
desc "Convert text to i18n keys in all views"
task :text_to_key do
FileList["./app/views/**/*.html.erb"].each do |filename|
system "i15r #{filename}"
end
end
You can’t perform that action at this time.