Sha256: 7271cf9b6e96d10071d78fdc56d9bc81fc374714f46e159cfd1987e4d7d574d7

Contents?: true

Size: 635 Bytes

Versions: 8

Compression:

Stored size: 635 Bytes

Contents

require "active_support/dependencies"
module ActiveMailer
  # Our host application root path
  # We set this when the engine is initialized
  mattr_accessor :app_root

  # Yield self on setup for nice config blocks
  def self.setup
    yield self
  end
end

require "active_mailer/engine"

ActiveRecord::ConnectionAdapters::SchemaStatements.module_eval do
  def create_active_mailer_table(*args, &block)
    block_with_default_columns = Proc.new do |t|
      t.integer   :sender_id
      t.timestamp :sent_at
      t.string    :subject
      block.call(t)
    end
    
    create_table(*args, &block_with_default_columns)
  end  
end 

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
active_mailer-0.0.10 lib/active_mailer.rb
active_mailer-0.0.9 lib/active_mailer.rb
active_mailer-0.0.8 lib/active_mailer.rb
active_mailer-0.0.7 lib/active_mailer.rb
active_mailer-0.0.6 lib/active_mailer.rb
active_mailer-0.0.5 lib/active_mailer.rb
active_mailer-0.0.4 lib/active_mailer.rb
active_mailer-0.0.3 lib/active_mailer.rb