Sha256: 251dcf03971aefc6b662469cd5451db3e50f0d17dab742696dfb1b2d3801d4b8

Contents?: true

Size: 637 Bytes

Versions: 2

Compression:

Stored size: 637 Bytes

Contents

require 'gritter/helpers'
require 'gritter/gflash'
require 'gritter/engine'
require 'fileutils'

module Gritter
  @rails_flash_fallback = false
  
  def self.rails_flash_fallback
    @rails_flash_fallback
  end
  def self.rails_flash_fallback=(val)
    @rails_flash_fallback = val
  end
  
  def self.initialize
    return if @initialized
    raise "ActionController is not available yet." unless defined?(ActionController)
    ActionController::Base.send(:helper, Gritter::Helpers)
    ActionController::Base.send(:include, Gritter::Gflash)
    @initialized = true
  end
end

if defined?(Rails::Railtie)
  require 'gritter/railtie'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gritter-1.2.0 lib/gritter.rb
gritter-1.1.0 lib/gritter.rb