normalize article and category attributes (closes foodcoops#294)
This commit is contained in:
parent
7c2ecd8658
commit
a43020463d
5 changed files with 18 additions and 0 deletions
11
config/initializers/attribute_normalizer.rb
Normal file
11
config/initializers/attribute_normalizer.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# config/initializers/attribute_normalizer.rb
|
||||
# @see https://github.com/mdeering/attribute_normalizer
|
||||
AttributeNormalizer.configure do |config|
|
||||
# The default normalizers if no :with option or block is given is to apply the :strip and :blank normalizers (in that order).
|
||||
# You can change this if you would like as follows:
|
||||
# config.default_normalizers = :strip, :blank
|
||||
|
||||
# You can enable the attribute normalizers automatically if the specified attributes exist in your column_names. It will use
|
||||
# the default normalizers for each attribute (e.g. config.default_normalizers)
|
||||
# config.default_attributes = :name, :title
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue