diff --git a/lib/simple_form/components.rb b/lib/simple_form/components.rb index 12fa12c8..6b7e414c 100644 --- a/lib/simple_form/components.rb +++ b/lib/simple_form/components.rb @@ -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' diff --git a/lib/simple_form/helpers/autofocus.rb b/lib/simple_form/helpers/autofocus.rb index e6199caf..ee7d5cb4 100644 --- a/lib/simple_form/helpers/autofocus.rb +++ b/lib/simple_form/helpers/autofocus.rb @@ -2,9 +2,10 @@ module SimpleForm module Helpers module Autofocus private + def has_autofocus? options[:autofocus] == true end end end -end \ No newline at end of file +end diff --git a/lib/simple_form/helpers/required.rb b/lib/simple_form/helpers/required.rb index d0247a07..66fb0261 100644 --- a/lib/simple_form/helpers/required.rb +++ b/lib/simple_form/helpers/required.rb @@ -24,10 +24,10 @@ 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 end end -end \ No newline at end of file +end