Sha256: 469ccd5f7f1cf5aeb6914d720df93b75491f9164357e5aecfd6338db001ccf76
Contents?: true
Size: 457 Bytes
Versions: 2
Compression:
Stored size: 457 Bytes
Contents
class RedactorRails::PicturesController < ApplicationController def index @pictures = RedactorRails.picture_model.find_all render :json => @pictures.to_json end def create @picture = RedactorRails::Picture.new file = params[:file] @picture.data = RedactorRails::Http.normalize_param(file, request) if @picture.save render :text => "<img src=#{@picture.url}/>" else render :nothing => true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
redactor-rails-0.2.0 | app/controller/redactor_rails/pictures_controller.rb |
redactor-rails-0.1.1 | app/controller/redactor_rails/pictures_controller.rb |