Last active
March 3, 2023 16:18
-
-
Save DevGW/008281237f8712a97332fbcd6fe80113 to your computer and use it in GitHub Desktop.
Ruby / Rails :: Adding a module to rails project #hha_ank
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Module can be used by any controller instead of helper.rb which is only for associated controller | |
### make sure to add | |
### config.autoload_paths += %W(#{config.root}/lib) | |
### to config/application.rb | |
# and don't forget to make the file in /lib/ with this format: modelname.rb | |
module MODULENAME | |
def METHODNAME | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment