Class: ActionDispatch::Routing::RouteSet

Inherits:
Object
  • Object
show all
Defined in:
lib/mount_doc/rails/route_set.rb

Instance Method Summary collapse

Instance Method Details

#finalize_with_mount_doc!Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/mount_doc/rails/route_set.rb', line 5

def finalize_with_mount_doc!
  result = finalize_without_mount_doc!

  begin
    self.eval_block(lambda{
      mount MountDoc::Engine => MountDoc::Config.auto_mount_path
    }) if MountDoc::Config.auto_mount? && self.named_routes.get(:mount_doc_rails_engine).nil?

    true
  end

  result
end