Module: ActiveModel::Typograf::InstanceMethods
- Defined in:
- lib/active_model/typograf.rb
Instance Method Summary collapse
-
#typograf_current_fields ⇒ Object
Run AlsTypograf#process on configured columns.
Instance Method Details
#typograf_current_fields ⇒ Object
Run AlsTypograf#process on configured columns. Used to run as before_validation filter (automaticaly added on ActiveRecord::Base.typograf)
8 9 10 11 12 13 14 |
# File 'lib/active_model/typograf.rb', line 8 def typograf_current_fields self.class.typograf_fields.each do |column, | if send(:"#{column}?") && send(:"#{column}_changed?") send(:"#{column}=", AlsTypograf.process(send(column).to_s, )) end end end |