Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Style.

  • Loading branch information...
commit 049cefd828c3d62030c7f3a292cfee442e15f032 1 parent a485dee
Postmodern authored
4 lib/dm-visualizer/graphviz.rb
View
@@ -55,12 +55,12 @@ def initialize(options={})
@colors = {
:one_to_many => 'blue',
- :one_to_one => 'red',
+ :one_to_one => 'red',
:inheritence => 'cyan'
}
@labels = {
:one_to_many => '1:m',
- :one_to_one => '1:1'
+ :one_to_one => '1:1'
}
if options[:file]
8 lib/dm-visualizer/visualization.rb
View
@@ -44,10 +44,11 @@ class Visualization
def initialize(options={})
@project = Project.new(options)
- @repository_names = {}
- @naming = :relational
+ @naming = :relational
@full_names = false
+ @repository_names = {}
+
if options[:repository_names]
options[:repository_names].each do |name,db_name|
@repository_names[name.to_sym] = db_name.to_s
@@ -84,7 +85,6 @@ def class_name(obj)
end
name = DataMapper::Inflector.demodulize(name) unless @full_names
-
return name
end
@@ -154,7 +154,7 @@ def model_repository_name(model)
#
def model_name(model)
if @naming == :schema
- name = model_repository_name(model)
+ name = model_repository_name(model)
storage_name = model.storage_names[:default]
storage_name ||= NamingConventions::Resource::UnderscoredAndPluralized.call(model.name)
Please sign in to comment.
Something went wrong with that request. Please try again.