07 Mar '13, 9am

Come implementare un drag&drop per l’upload delle immagini in Ruby on Rails

Come implementare un drag&drop per l’upload delle immagini in Ruby on Rails

class ImagesController < ApplicationController respond_to :json, :html, :js protect_from_forgery :except => :create # POST /images # POST /images.json def create file = AppSpecificStringIO.new(params[:qqfile], request.raw_post) @image = Image.new() @image.attachment = file @image.user_id = current_user.id respond_to do |format| if @image.save format.html do render :text => {:success => true, :id => @image.id, :src => @image.attachment.url(:thumb)}.to_json, :layout => false end format.json do render json => {:success => true, :id => @image.id, :src => @image.attachment.url(:thumb)}, :layout => false end else format.html do render :text => @image.errors.to_json, :layout => false end format.json do render :text => @image.errors.to_json, :layout => false end end end end # DELETE /images/1 # DELETE /images/1.json def destroy authorize! :destroy, @user, :message => 'Non sei auto...

Full article: http://www.dynamick.it/come-implementare-un-dragdrop-per-...

Tweets

Graduate Ruby on Rails Developer:

findmjob.com 06 Mar '13, 1am

£28k - £30k + benefits You are a talented programmer looking for your first professional gig, with a computer science back...

Using existing SQL Server database with Ruby on...

stackoverflow.com 07 Mar '13, 4am

You're in luck, friend. My first Rails project (7 years ago) was against a horribly set up SQL Server database. Per the ab...

We're looking for a Ruby on Rails Developer, 2-...

betapond.com 06 Mar '13, 8am

Want to work with some of the world’s best-known brands? Want to join a fast-growing social technology company? £30-£55K +...

Zendesk is looking for a Ruby on Rails Engineer...

hire.jobvite.com 07 Mar '13, 7pm

Ruby on Rails Engineer Dublin, Ireland We're looking for a talented Ruby on Rails engineer to help take Zendesk to the nex...

Angajari: Ruby on rails developer

myjob.ro 06 Mar '13, 10am

- you will write clean, well-engineered code that conforms with accepted standards, and test web applications; - you will ...

Curso intensivo de Ruby y Ruby on Rails

cuti.org.uy 03 Mar '13, 6pm

Tweet La empresa Neo (ex Cubox), en el marco de la organización de la próxima conferencia RubyConf Uruguay 2013, dictará u...

#RubyOnRails Troubleshoot and bug fix Ruby on R...

freelancer.com 05 Mar '13, 11pm

I'm looking for an experienced Ruby on Rails Developer (3 years+) to work on an existing site that is deployed and live. T...