Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

allow for various attributes on an uneditable_input

  • Loading branch information...
commit 14285ef93add537c766ddcfe9c9c9e8e63e771de 1 parent 0b19b05
sshaw authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/bootstrap_forms/form_builder.rb
View
5 lib/bootstrap_forms/form_builder.rb
@@ -130,10 +130,9 @@ def uneditable_input(name, *args)
label_field + input_div do
extras do
value = @field_options.delete(:value)
- options = { :class => 'uneditable-input' }
- options[:id] = @field_options[:id] if @field_options[:id]
+ @field_options[:class] = [@field_options[:class], 'uneditable-input'].compact.join ' '
- content_tag(:span, options) do
+ content_tag(:span, objectify_options(@field_options)) do
template.escape_html(value || object.send(@name.to_sym))
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.