Custom Modules
I am trying to customize the template and looking to segment my changes into external files as much as possible. I learned the hard way on my last app when I just started customizing and then lost track of the original code.
For example in the application controller there is this:
which if I read this right is the file located in:
For example in the application controller there is this:
include Jumpstart::Controller
which if I read this right is the file located in:
/lib/jumpstart/lib/jumpstart
module Jumpstart module Controller extend ActiveSupport::Concern included do prepend_before_action :jumpstart_welcome, if: -> { Rails.env.development? } end def jumpstart_welcome redirect_to jumpstart.root_path(welcome: true) unless File.exist?(Rails.root.join("config", "jumpstart.yml")) end end end
I know I can add this to my config:
config.autoload_paths += %W(#{config.root}/lib)
and drop files in the
/lib
folder etc. Just trying to understand if there is a standard way to do this before I get too far ahead of myself. Any pointers or links would be appreciated.Notifications
You’re not receiving notifications from this thread.