Sha256: e15c2200e1c261154c079276e229636719fce4741f9246de915d10122ed87652

Contents?: true

Size: 606 Bytes

Versions: 13

Compression:

Stored size: 606 Bytes

Contents

module RedHillConsulting::Core::ActiveRecord::ConnectionAdapters
	module SchemaStatements
		def self.included(base)
			base.module_eval do
				alias_method_chain :create_table, :redhillonrails_core
			end
		end

		def create_table_with_redhillonrails_core(name, options = {})
			if options.include?(:comment)
				options = options.dup
				comment = options.delete(:comment)
			end

			create_table_without_redhillonrails_core(name, options) do |table_defintion|
				table_defintion.name = name
				yield table_defintion if block_given?
			end

			set_table_comment(name, comment) if comment
		end
	end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
frolic-redhillonrails_core-0.0.1 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.9.1 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.9 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.8 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.6 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.5 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.4.1 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.4 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.3.1 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.3 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.2 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.1 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb
redhillonrails_core-1.0.0 lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb