Skip to content

codeodor/route

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
db
 
 
doc
 
 
lib
 
 
log
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Route is an experiment to see what it would look like if Rails controllers specified how to reach themselves, rather than having an omniscient routes.rb file.

It contains a simple Rails project which illustrates a proof of concept in github.com/codeodor/route/blob/master/app/controllers/courses_controller.rb.

The code behind the proof of concept is in a gem which you'll find here: github.com/codeodor/route/tree/master/vendor/gems/route

It hooks into Rails with the railtie: github.com/codeodor/route/blob/master/vendor/gems/route/lib/route/railtie.rb and it does the work of sending the calls to specify routes in github.com/codeodor/route/blob/master/vendor/gems/route/lib/route/route.rb

See my blog post for discussion of why having Rails controllers specify their own routes could be a good (or bad) idea.

About

An experiment to see what it would look like if Rails controllers specified how to reach themselves, rather than having an omniscient routes.rb file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published