You can clone with
HTTPS or Subversion.
I can't remove the blank option from the select tags when use_required_attribute is being used. I tried to remove it locally:
<%= f.input :activity, as: :select, include_blank: false %>
and also changing the global configuration:
Formtastic::FormBuilder.include_blank_for_select_by_default = false
Unfortunately, none of these approaches worked as expected. The only whey to make it work is turning off the usage of the required attribute:
#Formtastic::FormBuilder.use_required_attribute = true
I'd love to help on this one, but we have specs that cover this and I'm having a hard time figuring out where this has gone wrong for you.
Here's the code path once we hit SelectInput:
(options[:group_by] ? grouped_select_html : select_html)
Assuming this is not a multi-select:
builder.select(input_name, collection, input_options, input_html_options)
super.merge :include_blank => (include_blank unless prompt?)
So, include_blank is where it gets interesting:
options.key?(:include_blank) ? options[:include_blank] : (single? && builder.include_blank_for_select_by_default)
If you have : include_blank => false and you haven't provided a :prompt in your input options, we pass :include_blank => false to builder.select() (a standard Rails helper). I can't see anywhere that the use_required_attribute would impact this. I'm puzzled.
: include_blank => false
:include_blank => false
So, let's rule some stuff out:
bundle open formtastic
Closing due to inactivity. Feel free to re-open with new information.