Sha256: 85523320b051e111669c394658e37aa0dbbc77cc50ada1257beb4c6a767abeaf

Contents?: true

Size: 503 Bytes

Versions: 4

Compression:

Stored size: 503 Bytes

Contents

module DrawSmd
  class DiagramController < ::DrawSmd::ApplicationController
    def index
      @schemas = DrawSmd::Diagram.schemas

      title = 'smd'
      path = 'draw-smd'
      @image_file = File.join(path, "#{title}.png")

      @schema = ''
      @schema = params['schema'] if params.key?('schema')
      @schema = params['check']['schema'] if params.key?('check')

      diagram = DrawSmd::Diagram.new(File.join('public', 'images', path))
      diagram.create(title, @schema)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
draw_smd-0.1.2 app/controllers/draw_smd/diagram_controller.rb
draw_smd-0.1.1 app/controllers/draw_smd/diagram_controller.rb
draw_smd-0.1.0 app/controllers/draw_smd/diagram_controller.rb
draw_smd-0.0.1 app/controllers/draw_smd/diagram_controller.rb