Skip to content

Commit

Permalink
moving railtie into engine
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanb committed Jan 14, 2012
1 parent e71d0ba commit ba57b6b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion lib/private_pub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require "net/http"

require "private_pub/faye_extension"
require "private_pub/railtie" if defined? Rails
require "private_pub/engine" if defined? Rails

module PrivatePub
Expand Down
10 changes: 10 additions & 0 deletions lib/private_pub/engine.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
require "private_pub/view_helpers"

module PrivatePub
class Engine < Rails::Engine
initializer "private_pub.config" do
path = Rails.root.join("config/private_pub.yml")
PrivatePub.load_config(path, Rails.env) if path.exist?
end

initializer "private_pub.view_helpers" do
ActionView::Base.send :include, ViewHelpers
end
end
end
14 changes: 0 additions & 14 deletions lib/private_pub/railtie.rb

This file was deleted.

0 comments on commit ba57b6b

Please sign in to comment.