Sha256: f27f86ea2acbdf2bebd9a602b01daeb2d2797169dcca35ea154a92fbbb6d4765

Contents?: true

Size: 443 Bytes

Versions: 4

Compression:

Stored size: 443 Bytes

Contents

module Nodes
  module ApplicationHelper
    def form_error(o)
      if o.errors.any?
        haml_tag :div, :id => 'error_explanation' do
          haml_tag :h2 do
            haml_concat t(:error_save)
          end
          haml_tag :ul do
            o.errors.full_messages.each do |msg|
              haml_tag :li do
                haml_concat msg
              end
            end
          end
        end
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nodes-0.2.8 app/helpers/nodes/application_helper.rb
nodes-0.2.7 app/helpers/nodes/application_helper.rb
nodes-0.2.6 app/helpers/nodes/application_helper.rb
nodes-0.2.5 app/helpers/nodes/application_helper.rb