Reputation: 1585
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
Upvotes: 3
Views: 311
Reputation: 1133
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
Upvotes: 1