I'm reading the act-as-taggable Github document, https://github.com/mbleigh/acts-as-taggable-on, and I want to force tags to be saved downcase. The instruction in the Configuration section says to add the line
ActsAsTaggableOn.force_lowercase = true
but I'm not quite sure where this would go.
In what file am I supposed to put this piece of code?
Thanks!
You can create a custom initializer in config/initializers
and put this line there.
Or alternatively, you can set this in config/application.rb
:
module YourApp
class Application < Rails::Application
ActsAsTaggableOn.force_lowercase = true
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