Skip to content

Instantly share code, notes, and snippets.

@traviskroberts
Forked from dhh/gist:2492118
Last active October 3, 2015 17:58

Revisions

  1. traviskroberts renamed this gist Mar 10, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. traviskroberts revised this gist Apr 26, 2012. 1 changed file with 5 additions and 15 deletions.
    20 changes: 5 additions & 15 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,13 @@
    class ActionDispatch::Routing::Mapper
    def draw(routes_name)
    instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
    instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}_routes.rb")))
    end
    end

    BCX::Application.routes.draw do
    draw :api
    draw :account
    draw :session
    draw :people_and_groups
    draw :projects
    draw :calendars
    draw :legacy_slugs
    draw :ensembles_and_buckets
    draw :globals
    draw :monitoring
    draw :mail_attachments
    draw :message_preview
    draw :misc
    draw :admin
    draw :frontend
    draw :resources

    root to: 'projects#index'
    root :to => 'site#index'
    end
  3. traviskroberts revised this gist Apr 26, 2012. No changes.
  4. David Heinemeier Hansson created this gist Apr 25, 2012.
    23 changes: 23 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    class ActionDispatch::Routing::Mapper
    def draw(routes_name)
    instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
    end
    end

    BCX::Application.routes.draw do
    draw :api
    draw :account
    draw :session
    draw :people_and_groups
    draw :projects
    draw :calendars
    draw :legacy_slugs
    draw :ensembles_and_buckets
    draw :globals
    draw :monitoring
    draw :mail_attachments
    draw :message_preview
    draw :misc

    root to: 'projects#index'
    end