% model = options[:model] form = options[:form] name = options[:name] group_class_list = [ 'form-group', options[:group_class] ] label_class_list = [ 'control-label', options[:label_class] ] field_class_list = [ 'input-group', options[:field_class] ] input_class_list = [ 'form-control', options[:input_class] ] error_class_list = [ 'text-danger', options[:error_class] ] group_class_list << 'has-error' if model.errors[name].present? group_class = group_class_list.flatten.join ' ' label_class = label_class_list.flatten.join ' ' field_class = field_class_list.flatten.join ' ' input_class = input_class_list.flatten.join ' ' error_class = error_class_list.flatten.join ' ' input_prefix = options[:input_prefix] input_suffix = options[:input_suffix] label_text = options[:label_text] label_prefix = options[:label_prefix] label_suffix = options[:label_suffix] input_options = { class: input_class_list, disabled: options[:disabled] } error_hidden = options[:error_hidden] choices = options[:choices] flags = options[:options]||{} %>
<%= model.errors[name].first %>
<% end %>