class EasySettings::IntegerKey
Public Instance Methods
Source
# File lib/redmine_extensions/easy_settings/key.rb, line 84 def from_params(easy_setting, value) value.try(:to_i) end
Source
# File lib/redmine_extensions/easy_settings/key.rb, line 88 def validate(easy_setting) easy_setting.instance_eval do if !value.nil? && !value.is_a?(Integer) errors.add(:base, "#{name} must be inetger") end end end