uses a module to structure controller code

This commit is contained in:
rgarcia
2016-07-19 13:49:00 +02:00
parent 1e35ca4895
commit 33a44fc470
5 changed files with 15 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
module Budgets
class BudgetsController < ApplicationController
skip_authorization_check
def index
end
end
end

View File

@@ -1,4 +1,4 @@
class Budget
module Budgets
class InvestmentsController < ApplicationController
skip_authorization_check

View File

@@ -0,0 +1 @@
budgets index

View File

@@ -75,8 +75,10 @@ Rails.application.routes.draw do
end
end
namespace :budget do
resources :investments, only: [:index]
scope module: :budgets do
resources :budgets do
resources :investments, only: [:index]
end
end
resources :stats, only: [:index]