Sha256: 94dc3c9bbc5b68746204d20214f055dafeef0da43848f9258884dec08fd8fa1a

Contents?: true

Size: 699 Bytes

Versions: 1

Compression:

Stored size: 699 Bytes

Contents

require 'orm_adapter/adapters/active_record'
module ReportUi
  module Orm
    # This module contains some helpers and handle schema (migrations):
    #
    #   create_table :reports do |t|
    #     t.reporter
    #   end
    #
    module ActiveRecord

      module Schema
        include ReportUi::Schema

        # Tell how to apply schema methods.
        def apply_reporter_schema(name, type, options={})
          column name, type.to_s.downcase.to_sym, options
        end
      end
    end
  end
end
ActiveRecord::ConnectionAdapters::Table.send :include, ReportUi::Orm::ActiveRecord::Schema
ActiveRecord::ConnectionAdapters::TableDefinition.send :include, ReportUi::Orm::ActiveRecord::Schema

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
report_ui-0.0.1.alpha lib/report_ui/orm/active_record.rb