lib/model_probe.rb
# Prints a stub that can be used for a test fixture
Prints a stub that can be used for a test fixture
Prints a stub that can be used for a test fixture
def print_fixture
    values = columns.sort_by(&:name).each_with_object({}) do |column, memo|
      next if primary_key_column?(column)
      next if timestamp_column?(column)
      memo[column.name] = column.default || "value"
    end
    hash = { self.name.underscore => values }
    puts hash.to_yaml
    nil
  end
def print_fixture values = columns . sort_by ( & :name ) . each_with_object ( { } ) do | column , memo | next if primary_key_column? ( column ) next if timestamp_column? ( column ) memo [ column . name ] = column . default || "value" end hash = { self . name . underscore => values } puts hash . to_yaml nil end
Prints a stub that can be used for a test fixture
Prints a stub that can be used for a test fixture