[katello-devel] Split routes.rb into UI and API

Jason Rist jrist at redhat.com
Wed Jan 18 13:30:23 UTC 2012


On 01/18/2012 02:02 AM, Lukas Zapletal wrote:
> Something like this:
> 
> routes.rb
> 
> require 'application_routes'
> require 'rest_api_routes'
> 
> lib/application_routes.rb
> 
> YourApplication::Application.routes.draw do
> # Application related routes
> end
> 
> lib/rest_api_routes.rb
> 
> YourApplication::Application.routes.draw do
> # REST API related routes
> end
> 
> Good idea what you think?
> 
> LZ
> 
> On Wed, Jan 18, 2012 at 09:54:50AM +0100, Lukas Zapletal wrote:
>> Hey,
>>
>> I always find difficult to find out if the current line in the routes.rb
>> is UI or API route. I vote for moving out all API routes into an
>> external (imported) file routes-api.rb if this is possible.
>>
>> Objections?
>>
>> -- 
>> Later,
>>
>>  Lukas Zapletal | E32E400A
>>  RHN Satellite Engineering
>>  Red Hat Czech s.r.o. Brno
>>
>> _______________________________________________
>> katello-devel mailing list
>> katello-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/katello-devel
> 

I'm not really opposed to it and it's probably not a large amount of
cycles to implement, but why not just have a large block of comments?
Are you hitting bugs that are telling you error is in line xxx of routes.rb?

-J

-- 
Jason E. Rist
Senior Software Engineer
Systems Management and Cloud Enablement
Red Hat, Inc.
+1.919.754.4048
Freenode: jrist




More information about the katello-devel mailing list