Skip to content

Commit

Permalink
Provides a named initialization hook so people depending on the gem c…
Browse files Browse the repository at this point in the history
…an ensure pre-requisite configuration is complete prior to initialization of neography itself
  • Loading branch information
pboling committed Jan 18, 2013
1 parent f9804f5 commit c450858
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/neography/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@
module Neography
class Railtie < Rails::Railtie

# To add an initialization step from your Railtie to Rails boot process, you just need to create an initializer block:
# See: http://api.rubyonrails.org/classes/Rails/Railtie.html
initializer 'neography.configure' do
# Provides a hook so people implementing the gem can do this in a railtie of their own:
# initializer "my_thing.neography_initialization", before: 'neography_railtie.configure_rails_initialization' do
# require 'my_thing/neography'
# end
end

rake_tasks do
load "neography/tasks.rb"
load 'neography/tasks.rb'
end
end
end

0 comments on commit c450858

Please sign in to comment.