lib/foreign_key_migrations.rb
# Prepares the arguments for use and yields them back.
Prepares the arguments for use and yields them back.
Prepares the arguments for use and yields them back .
def prep_args(table_name, foreign_key, references, options={})
        table_name = table_name.to_s
        foreign_key = foreign_key.to_s if foreign_key.is_a?(Symbol)
        references = references.to_s if references.is_a?(Symbol)
        foreign_key.collect! {|x| x.to_s } if foreign_key.is_a?(Array)
        references.collect! {|x| x.to_s } if references.is_a?(Array)
        yield(table_name, foreign_key, references, options)
      end
def prep_args ( table_name , foreign_key , references , options = { } ) table_name = table_name . to_s foreign_key = foreign_key . to_s if foreign_key . is_a? ( Symbol ) references = references . to_s if references . is_a? ( Symbol ) foreign_key . collect! { | x | x . to_s } if foreign_key . is_a? ( Array ) references . collect! { | x | x . to_s } if references . is_a? ( Array ) yield ( table_name , foreign_key , references , options ) end
Prepares the arguments for use and yields them back.
Prepares the arguments for use and yields them back .
table_name
<not_specific>
foreign_key
<not_specific>
references
<not_specific>
options
<not_specific>