Skip to content

Instantly share code, notes, and snippets.

@somazx
Last active February 2, 2019 21:56
Show Gist options
  • Save somazx/225015cefc7878c2726d884dc5f3648f to your computer and use it in GitHub Desktop.
Save somazx/225015cefc7878c2726d884dc5f3648f to your computer and use it in GitHub Desktop.
# config/application.rb
config.autoload_paths = Dir['app/domains/*/*/']
# app/domains/lms/controllers/lms/courses_controller.rb
module Lms
class CoursesController < ApplicationController
prepend_view_path( Rails.root.join('app/domains/lms/views') )
def index
end
end
end
# app/domains/lms/views/lms/courses/index.erb
<h1>Hello World</h1>
resources :courses, module: 'lms'
@somazx
Copy link
Author

somazx commented Feb 2, 2019

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment