mirror of
https://github.com/heartcombo/simple_form.git
synced 2022-11-09 12:19:26 -05:00
Small doc improvements
This commit is contained in:
parent
081d6b3e13
commit
73aa9da202
3 changed files with 6 additions and 5 deletions
|
@ -1,10 +1,10 @@
|
|||
module SimpleForm
|
||||
# Components are a special type of helpers that can work on their own.
|
||||
# For example, by using a component, it will automatically change the
|
||||
# output under given circunstences without user input. For example,
|
||||
# output under given circumstances without user input. For example,
|
||||
# the disabled helper always need a :disabled => true option given
|
||||
# to the input in order to be enabled. On the other hand, things like
|
||||
# hint can generate output automatically by doing I18n lookups.
|
||||
# hints can generate output automatically by doing I18n lookups.
|
||||
module Components
|
||||
autoload :Errors, 'simple_form/components/errors'
|
||||
autoload :Hints, 'simple_form/components/hints'
|
||||
|
|
|
@ -2,6 +2,7 @@ module SimpleForm
|
|||
module Helpers
|
||||
module Autofocus
|
||||
private
|
||||
|
||||
def has_autofocus?
|
||||
options[:autofocus] == true
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ module SimpleForm
|
|||
end
|
||||
|
||||
# Do not use has_required? because we want to add the class
|
||||
# regardless of the
|
||||
# regardless of the required option.
|
||||
def required_class
|
||||
required_field? ? :required : :optional
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue