lib/formular/elements.rb
def inject_placeholder(collection)
        placeholder = if options[:include_blank]
                        placeholder_option(options[:include_blank])
                      elsif options[:prompt] && options[:value].nil?
                        placeholder_option(options[:prompt])
                      end

        collection.unshift(placeholder) if placeholder

        collection
      end
# same handling as simple form
# prompt: a nil value option appears if we have no selected option
# include blank: includes our nil value option regardless (useful for optional fields)
same handling as simple form
prompt: a nil value option appears if we have no selected option
include blank: includes our nil value option regardless (useful for optional fields)
same handling as simple form prompt : a nil value option appears if we have no selected option include blank : includes our nil value option regardless ( useful for optional fields )
def inject_placeholder(collection)
        placeholder = if options[:include_blank]
                        placeholder_option(options[:include_blank])
                      elsif options[:prompt] && options[:value].nil?
                        placeholder_option(options[:prompt])
                      end
        collection.unshift(placeholder) if placeholder
        collection
      end
def inject_placeholder ( collection ) placeholder = if options [ :include_blank ] placeholder_option ( options [ :include_blank ] ) elsif options [ :prompt ] && options [ :value ] . nil? placeholder_option ( options [ :prompt ] ) end collection . unshift ( placeholder ) if placeholder collection end
same handling as simple form
prompt: a nil value option appears if we have no selected option
include blank: includes our nil value option regardless (useful for optional fields)
same handling as simple form prompt : a nil value option appears if we have no selected option include blank : includes our nil value option regardless ( useful for optional fields )
collection