Module: ClientSideValidations::ActiveModel::EnumerableValidator
Instance Method Summary collapse
Instance Method Details
#client_side_hash(model, attribute, force = nil) ⇒ Object
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/client_side_validations/active_model.rb', line 153 def client_side_hash(model, attribute, force = nil) = self..dup if [:in].respond_to?(:call) return unless force [:in] = [:in].call(model) end hash = build_client_side_hash(model, attribute, ) if hash[:in].is_a?(Range) hash[:range] = hash[:in] hash.delete(:in) end hash end |