I am having some constants that I want to define globally in my applications. Also, these constants don't belong to any model. What's the best practice to organize those constants.
Any advice is highly appreciated
simple you can define Module called as example Constants and define it inside the module
module Constants
CONST1="value"
CONST2="value2"
end
it's possible also to group them like
module Constants
module Group1
CONST1="value"
CONST2="value2"
end
module Group2
# some relevant constants
end
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With