Class: Icofont::GlyphsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/icofont/glyphs_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
# File 'app/controllers/icofont/glyphs_controller.rb', line 5

def index
  render :json => Glyph.fetch
end

#updateObject



9
10
11
12
13
14
# File 'app/controllers/icofont/glyphs_controller.rb', line 9

def update
  glyphs = params[:glyphs] || []
  Glyph.store glyphs
  FontProcessor.new(glyphs).generate
  render :json => { message: 'success' }
end