JohnKellyFerguson/octomaps

View on GitHub
admin/views/countries/_form.haml

Summary

Maintainability
Test Coverage
- error = @country.errors.include?(:name)
%fieldset.control-group{:class => error ? 'has-error' : ''}
  =f.label :name, :class => 'control-label'
  .controls
    =f.text_field :name, :class => 'input-xlarge input-with-feedback', :autofocus => true
    %span.help-inline=error ? f.error_message_on(:name, :class => 'text-error') : pat(:example)

.form-actions
  =f.submit pat(:save), :class => 'btn btn-primary'
   
  =f.submit pat(:save_and_continue), :class => 'btn btn-info', :name => 'save_and_continue'
   
  =link_to pat(:cancel), url(:countries, :index), :class => 'btn'