Class: ArDiagram::View

Inherits:
Base
  • Object
show all
Defined in:
app/models/ar_diagram/view.rb

Instance Method Summary collapse

Instance Method Details

#new_table(model) ⇒ Object



15
16
17
# File 'app/models/ar_diagram/view.rb', line 15

def new_table model
  self.dbd_tables.create({:name => model})
end

#to_paramObject



11
12
13
# File 'app/models/ar_diagram/view.rb', line 11

def to_param
  "#{id}-#{name.downcase.strip.gsub(/[^a-z0-9\- ]/i, '').gsub(/[ \-]+/, '-')}"
end