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
Seth Veale
ae526b30c7
Added a minlength validation on first attempt? Wooo - wish I could put bangs in commit messages *bang*
2016-08-22 10:32:54 +12:00
Rafael Mendonça França
15f0101545
Pass the options hash instead of the Leaf object
...
Right now we only care about the options so lets make the code simpler
2014-03-11 19:41:25 -03:00
Rafael Mendonça França
e9384fb4bd
Whitespaces
2014-03-11 19:13:59 -03:00
Rafael Mendonça França
4a13b2f99c
Move the context check down to the method
2014-03-11 16:39:24 -03:00
Rafael Mendonça França
3992cfc57d
Extract the wrapper options merge behavior to their own module
...
This make easier to share the same behavior between all the components
2014-03-11 16:33:51 -03:00
Rafael Mendonça França
44f22ca3fb
Make context optional
...
We plan to make it required in the future but it is optional now to make
easier to implement backwards compatibility
2014-03-11 15:22:45 -03:00
Rafael Mendonça França
df47a8599d
Merge the context options with the input options
2014-03-11 10:30:49 -03:00
Rafael Mendonça França
645988a855
Pass the context when rendering the component
2014-03-10 18:41:36 -03:00
Lucas Mazza
96a5b64d3e
SimpleForm no longer sets the `size` attribute by itself.
...
This should be managed using CSS or you should set the `size` option
on your own. The `default_input_size` configuration setting is now
deprecated and should be removed on SimpleForm 3.1+.
See #542 .
2012-12-27 19:39:32 -02:00
José Valim
e8749ae07e
Add class default options to avoid has_*? checks.
2011-12-04 13:29:59 +01:00
José Valim
ce19f2b898
Make maxlength a component.
2011-12-04 13:14:39 +01:00
José Valim
6bf59dd508
Get rid of the enabled/disabled in favor of has_*? syntax.
2011-12-04 12:29:53 +01: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
José Valim
5d6d977fc8
Break up mapping input and also provide an enable API.
2011-09-03 11:13:29 +02:00
José Valim
6dfdbae374
Create PasswordInput.
2011-09-03 11:02:58 +02:00