I hereby claim:
- I am KieranP on github.
- I am k776 (https://keybase.io/k776) on keybase.
- I have a public key whose fingerprint is D567 916A E829 323F 1C1B 12D2 F98C BBEC 277A 2FCF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # frozen_string_literal: true | |
| class ApplicationComponent | |
| include ActiveModel::Validations | |
| include ActionView::Helpers::TagHelper | |
| attr_accessor :content | |
| def initialize(*args) |
| class BaseJob | |
| def self.queue(*args) | |
| options = args.extract_options! | |
| Delayed::Job.enqueue(new(*args), options) | |
| end | |
| def initialize(*args) | |
| @args = args | |
| end |
| # A user session class, a simplified mix of the following code samples: | |
| # * https://github.com/blog/1661-modeling-your-app-s-user-session | |
| # * http://www.jonathanleighton.com/articles/2013/revocable-sessions-with-devise/ | |
| class Session < ActiveRecord::Base | |
| # Uncomment if you use Hobo Fields, else add these yourself | |
| # fields do | |
| # session_id :string, :index => true, :unique => true | |
| # accessed_at :datetime | |
| # user_ip :string |
| task :orphaned_check => :environment do | |
| Dir[Rails.root.join('app/models/*.rb').to_s].each do |filename| | |
| klass = File.basename(filename, '.rb').camelize.constantize | |
| next unless klass.ancestors.include?(ActiveRecord::Base) | |
| orphanes = Hash.new | |
| klass.reflect_on_all_associations(:belongs_to).each do |belongs_to| | |
| assoc_name, field_name = belongs_to.name.to_s, belongs_to.foreign_key.to_s |
| ====== | |
| README | |
| ====== | |
| This will add a display of the current directories Git state. | |
| Warning: This script relies on a Git version of 1.7.2 or higher! | |
| Install | |
| ------- |