Module: SexyPgConstraints::Helpers

Included in:
Constrainer, Deconstrainer
Defined in:
lib/sexy_pg_constraints/constrainers/helpers.rb

Instance Method Summary collapse

Instance Method Details

#execute(*args) ⇒ Object



9
10
11
# File 'lib/sexy_pg_constraints/constrainers/helpers.rb', line 9

def execute(*args)
  ActiveRecord::Base.connection.execute(*args)
end

#make_title(table, column, type) ⇒ Object



3
4
5
6
7
# File 'lib/sexy_pg_constraints/constrainers/helpers.rb', line 3

def make_title(table, column, type)
  column = column.join('_') if column.respond_to?(:join)

  "#{table}_#{column}_#{type}"
end