Sha256: 17ea45e2643aab0316620362f2ff9f1c5d370006ec53c2917f489ab33a4a99c0

Contents?: true

Size: 717 Bytes

Versions: 2

Compression:

Stored size: 717 Bytes

Contents

module FlashRailsMessages
  class Base
    # ZURB FOUNDATION FRAMEWORK
    # =========================================

    def alert_element(type, message)
      content_tag :div, class: alert_classes(type), 'data-alert': '' do
        close_element + message.html_safe
      end
    end

    #def close_element
      #content_tag :a, class: 'close', href: '#' do
        #'×'.html_safe
      #end
    #end

    def default_alert_classes
      'alert-box'
    end

    def alert_type_classes
      {
        success: 'success',
        notice: 'info',
        alert: 'alert',
        error: 'alert',
      }
    end

    #def custom_alert_classes
      #Add custom alert classes as a string
    #end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flash_rails_messages-2.0.0 lib/generators/flash_rails_messages/templates/config/initializers/flash_rails_messages_foundation.rb
flash_rails_messages-1.0.2 lib/generators/flash_rails_messages/templates/config/initializers/flash_rails_messages_foundation.rb