Skip to content
/ route Public

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.

Notifications You must be signed in to change notification settings

codeodor/route

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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