techvision/brails4

View on GitHub
app/views/profiles/_form.html.haml

Summary

Maintainability
Test Coverage
.col-md-4
  .container
    = simple_form_for [current_user, @profile], url: user_profile_path(@user), html: {class: 'form-horizontal'} do |f|
      = f.input :name, input_html: {class: "form-control"}
      = f.input :gender, collection: ['Male', 'Female'], :prompt => "Select Gender", input_html: {class: "form-control"}
      = f.input :address, input_html: {class: "form-control"}
      = f.input :country, :prompt => "Select Country", input_html: {class: "form-control"}

      .form-actions.margin_top_20px
        = f.button :submit, class: 'btn-primary'
        = link_to t('.cancel', :default => t("helpers.links.cancel")), user_path(current_user), class: 'btn'