Created
September 4, 2015 19:48
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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