Andres Ehrenpreis
928adab801
Code cleanup
2018-01-08 10:29:03 +02:00
Dillon Welch
cac943e891
Add frozen_string_literal in all .rb files
...
I noticed these files all had strings such as "", " ", "_" that were
allocated each time some common methods were called, over 1000x on a
page in my app. This comment freezes all of these strings such that
they're only allocated once, saving many KB of memory allocation.
2017-11-27 17:06:18 -08:00
Rafael Mendonça França
274d6ec111
Check by the validation kind method instead of the full constant
2012-10-03 00:05:47 -03:00
humancopy
ce6513830d
Extract code which checks if required by validators from calculate_required into required_by_validators? for accessibility
2012-02-09 21:48:17 +01:00
Carlos Antonio da Silva
89a6829ded
Only check for existence of validators when trying to find them
...
This allows a bit of cleanup on some components which are always
checking for has_validators? before doing the validators lookup.
2011-12-10 16:08:04 -02:00
Carlos Antonio da Silva
04778b99b4
Use private in disabled helpers, as in the others
2011-12-10 16:07:28 -02:00
Carlos Antonio da Silva
73aa9da202
Small doc improvements
2011-12-10 15:55:27 -02:00
José Valim
2d41fafe9b
Move required to html5 component.
2011-12-05 10:44:02 +01:00
Rafael Mendonça França
cc5fd25e48
Add readonly component. Closes #378
2011-12-04 23:41:54 -02:00
José Valim
94dab68cd7
Create more components. Make explicit the difference between helpers and components. Add default options to wrappers.
2011-12-04 14:57:12 +01:00
José Valim
10f2e67708
Make pattern a component.
2011-12-04 13:40:04 +01:00
José Valim
ce19f2b898
Make maxlength a component.
2011-12-04 13:14:39 +01:00
José Valim
5ee02bdd2c
Make required a component.
2011-12-04 13:03:09 +01:00
José Valim
fcd049adc6
Convert disabled to a component.
2011-12-04 12:15:22 +01:00
Stephen Ingram
fd62add671
Added :readonly as f.input html option
...
Added the ability to specify :readonly => true to f.input. Works the
same as :disabled. The code is a clone of the code for :disabled.
2011-11-25 23:38:47 -10:00
Rafael Mendonça França
96275d6241
Extract disabled logic to a helper. Closes #317
2011-09-11 18:53:00 -03:00
José Valim
c74243aca6
Revert "Browser validations should not affect required."
...
This reverts commit 85b70152eaa2ab5a163d9fe307f5433d37771397.
2011-09-08 16:04:36 +02:00
José Valim
93bcf58b61
Browser validations should not affect required.
2011-09-08 16:04:36 +02:00
José Valim
ba6bbac56c
Small clean up.
2011-09-08 16:04:18 +02:00
José Valim
594f94afb6
Remove Helpers::HasErrors.
2011-09-08 16:04:18 +02:00
José Valim
c11f35d0e8
Fixes after merge.
2011-09-08 16:03:55 +02:00
Rafael Mendonça França
619888ad5b
Whitespaces
2011-09-08 10:28:28 -03:00
Carlos Antonio da Silva
35803ba77c
Refactor finding validators
2011-09-03 10:15:43 -03:00
José Valim
ff646641ed
Patterns should be activated on demand.
2011-09-03 12:11:15 +02:00
José Valim
3387cc7066
Move HasErrors to helpers.
2011-09-03 12:04:23 +02:00
José Valim
a4655ba845
Refactor Inputs::Base into helpers and make :on based on the resource status.
2011-09-03 12:00:23 +02:00