Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[^] boot process was improved

  • Loading branch information...
commit 86b91549e685349a1f751fdee53ff623fedfc8e7 1 parent ad38e89
@romanvbabenko romanvbabenko authored
Showing with 19 additions and 1 deletion.
  1. +19 −1 lib/rails-footnotes.rb
View
20 lib/rails-footnotes.rb
@@ -24,14 +24,32 @@ def self.included(base)
end
end
- def self.run!
+ def self.require_dependencies
require 'rails-footnotes/footnotes'
require 'rails-footnotes/backtracer'
require 'rails-footnotes/abstract_note'
+ end
+
+ def self.require_notes
require 'rails-footnotes/notes/all'
+ end
+
+ def self.require_note(note_name)
+ require "rails-footnotes/notes/#{note_name.to_s.underscore}_note"
+ end
+ def self.run!
+ require_dependencies
+ require_notes
+ load_extension
+ load_config
+ end
+
+ def self.load_extension
ActionController::Base.send(:include, RailsFootnotesExtension)
+ end
+ def self.load_config
load Rails.root.join('.rails_footnotes') if Rails.root.join('.rails_footnotes').exist?
#TODO DEPRECATED
load Rails.root.join('.footnotes') if Rails.root.join('.footnotes').exist?
Please sign in to comment.
Something went wrong with that request. Please try again.