Class: RailsBridge::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/rails_bridge/engine.rb

Overview

namespace our plugin and inherit from Rails::Railtie to get our plugin into the initialization process

Class Method Summary collapse

Class Method Details

.create_rails_bridge_homeObject



23
24
25
26
27
28
29
30
31
# File 'lib/rails_bridge/engine.rb', line 23

def self.create_rails_bridge_home
  rails_bridge_home = File.join( Rails.root, RailsBridge::ROOT_PATH )
  FileUtils.mkdir_p( rails_bridge_home ) unless File.exist?( rails_bridge_home )
  layout_bridge_views_path = File.join( Rails.root, RailsBridge::VIEWS_PATH )
  layout_bridge_layouts_path = File.join( Rails.root, RailsBridge::LAYOUTS_PATH )
  FileUtils.mkdir_p( layout_bridge_views_path ) unless File.exist?( layout_bridge_views_path )
  FileUtils.mkdir_p( layout_bridge_layouts_path ) unless File.exist?( layout_bridge_layouts_path )
  rails_bridge_home
end