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
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 |
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
#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? |
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
#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 |