Sha256: ef2cf7a4d293dacdcdfcbda1f7e6559ac52947650b25325d9745e350ed4f0e21

Contents?: true

Size: 447 Bytes

Versions: 2

Compression:

Stored size: 447 Bytes

Contents

module DrawErd
  class DiagramController < ::DrawErd::ApplicationController
    def index
      title = 'erd'
      path = 'draw-erd'
      @image_file = File.join(path, "#{title}.png")

      @domains = []
      @domains = params['schemas'].keys if params.key?('schemas')

      diagram = DrawErd::Diagram.new(File.join('public', 'images', path))
      diagram.create(title, @domains)

      @schemas = DrawErd::Diagram.schemas
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
draw_erd-0.1.0 app/controllers/draw_erd/diagram_controller.rb
draw_erd-0.0.1 app/controllers/draw_erd/diagram_controller.rb