Permalink
Browse files

Split if condition

  • Loading branch information...
1 parent 3c2ace8 commit 9a25aaaeea449d82f2a25f9be705137a79d199f0 @carlosantoniodasilva carlosantoniodasilva committed Jan 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/simple_form/components/maxlength.rb
@@ -11,7 +11,8 @@ def maxlength
def maximum_length_from_validation
if options[:maxlength] == true
- if (length_validator = find_length_validator) && !length_validator.options[:tokenizer]
+ length_validator = find_length_validator
+ if length_validator && !length_validator.options[:tokenizer]
length_validator.options[:is] || length_validator.options[:maximum]
end
else

0 comments on commit 9a25aaa

Please sign in to comment.