Skip to content

Instantly share code, notes, and snippets.

@pgeraghty
Created September 4, 2015 19:48
Show Gist options
  • Save pgeraghty/002970421ef9937580a2 to your computer and use it in GitHub Desktop.
Save pgeraghty/002970421ef9937580a2 to your computer and use it in GitHub Desktop.
Simple Form static input as used by Bootstrap 3+ to have correct alignment in forms
module SimpleForm
module Inputs
class StaticInput < SimpleForm::Inputs::StringInput
def input
template.content_tag(:p, object.send(attribute_name), class: 'form-control-static')
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment